how to stop using google page speed
Asked Answered
I

9

19

I have a wordpress website I'm creating for a client temporarily hosted on http://dev.eatfit.co.nz/

I'm noticing that often (but not every time) that I browse a page (for example the home page), what I assume is the google pagespeed online service seems to rewrite the url's on the fly to optimise things, so I get urls like this coming back to me (viewable in fiddler or in the .html source)

http://dev.eatfit.co.nz/wp-content/themes/eatfit/images/xfoot-logo.png.pagespeed.ic.SWoJqa9Ly9.png

I do not want to happen and I want to turn off the google pagespeed as it is incorrectly optimising the css and also constantly caching so testing updates is painful.

The strange thing is I've never turned on the online google pagespeed for this website and there are no special optimisation plug-ins in my wordpress install doing this. I looked up their online service and apparently you have to put in a special cname dns entry to get pagespeed to work - but no such cname exists on this domain.

It appears that somewhere between the hosting company server and my client computer the urls are being automatically rewritten. How is this happening and how can it be stopped.

Insubstantial answered 20/1, 2012 at 9:54 Comment(1)
I realise that this is old but thought I'd just add that Pagespeed tries out different optimisations to find the best fit. As a result the links to files change often during this period. If you use caching, you can find issues in that old pagespeed links are cached and reused when they no longer 'exist' on the server. So, this isn't pagespeed "incorrectly optimising the css". It's actually doing what it's supposed to, but that does cause issues during dev periods and one live cached site.Selestina
B
54

It looks like mod_pagespeed is installed on the host.

If you don't have access to disable it for your site, you can add ?ModPagespeed=off to the end of your URL in the browser like this

http://dev.eatfit.co.nz/?ModPagespeed=off

Bony answered 20/1, 2012 at 10:44 Comment(3)
That's great. I tried using PageSpeed=off and ModPageSpeed=off, and neither worked. Lowercasing the s in "speed" (in your example) did the trick.Chic
Thank you! This was causing me some serious issues with php-phantomJS and rendering images that were loaded by mod_pagespeed.Slope
This answer is temporary only on ?ModPagespeed=off, If i directly live domain not filter working.... Need to change in pagespeed.conf file from on to off @ < ModPagespeed off >Smaltite
G
12

If you look in your apache conf.d directory (mine is at /etc/httpd/conf.d), you should see a file called pagespeed.conf. To completely disable the service, find the line that says:

ModPagespeed on

and change it to:

ModPagespeed off

... then restart your httpd service with "service httpd restart".

Gammy answered 19/5, 2013 at 21:43 Comment(0)
I
10

Those two replies are both accurate - The answer is yes it is an apache module installed by the hosting company on all accounts - to turn it off you can add the line below in your .htaccess file:

ModPagespeed off

Insubstantial answered 25/1, 2012 at 22:22 Comment(0)
A
3

Need to change in pagespeed.conf file from on to off

ModPagespeed off 

Location of the file in Ubuntu/Debian

/etc/apache2/conf.d/pagespeed.conf

Location of the file in CentOS/httpd

/etc/httpd/conf.d/pagespeed.conf

Dont Forgot to restart apache or httpd services.

for individual website via .htaccess

ModPagespeed off 
Aureliaaurelian answered 31/8, 2016 at 8:8 Comment(0)
M
1

By the look of it, it is a module for apache, so it might be installed on your hosting server, I would contact your host if you haven't asked for it.

Mattland answered 20/1, 2012 at 10:48 Comment(0)
X
1

I can confirm all the answers listed above. It looks like you've indeed turned it off via your .htaccess file. However I would like to know what functional problems you ran into with the CSS. I could not detect any visual difference on your home page with & without mod_pagespeed. If you found a bug we'd like to fix it.

It is true that it adds caching to your resources, but the server checks for changes every 5 minutes if you don't have an explicit TTL and writes out URLs with new content-hashes whenever the data changes. Even that 5-minute delay can admittedly get annoying while developing, but there is a relatively new feature: ModPagespeedLoadFromFile which makes deveoping with mod_pagespeed on much smoother and also improves server performance.

The benefits of all of this are that there are many fewer round-trips to your server and significantly lower latency to your end-users. Check out webpagetest results:

Video, mod_pagespeed on, mod_pagespeed off

Also, would you mind telling me what hosting provider you use that turns mod_pagespeed on by default? Thanks!

Xerophagy answered 8/2, 2012 at 20:6 Comment(0)
C
1

For me it worked like this(Beware it would turn off pagespeed for all requests, no querystring ) :

vim /etc/apache2/mods-available/pagespeed.conf
#ModPagespeed on
ModPagespeed unplugged
:wq

I am commenting ModPagespeed on , and adding ModPagespeed unplugged line here. Hope it helps.

Cobweb answered 1/9, 2014 at 8:13 Comment(0)
F
0

And if you want pagespeed to stop changing your filenames ad this filter:

pagespeed InPlaceResourceOptimization on;

See here about that. Chapter is called "In-Place Resource Optimization"

Also if you define static files you will see changes right away and improve performance. See here about that. Seek chapter "Loading static files from disk"

Frugivorous answered 17/8, 2015 at 21:53 Comment(0)
F
0

on my lamp installation on Elementary OS , the conf file of pagespeed is on

lampstack-(yourversion)/apache2/conf/pagespeed.conf
Flense answered 6/9, 2016 at 13:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.