February 27, 2013 at 1:32 pm #20729
This is more of a wordpress issue than Avisio (or so I think), but since I haven’t received any help over there, I thought maybe someone might know the problem here… if you go here: “http://gtmetrix.com/reports/allurexpressions.com/92GjLZmm” you’ll see that gtmetrix has given me a score of 18 for “leverage browser caching” under page speed, and a score of 0 for “add expires headers” under yslow, not to mention a 45 for “use cookie-free domains”.
Nothing I’ve tried has been able to resolve these issues. It shows most of my resources with an expiration of 1 day. I haven’t set this anywhere, how can I change it.
S/N: Installing W3 Total Cache does absolutely nothing to my page or yslow scores at this point, doesn’t affect browser caching or expires headers. What could be preventing me from setting these? Any help would be greatly appreciated!February 28, 2013 at 7:03 am #108829
I can remember that I experienced the same issues with my old host which didn’t support the gzip compression (mod_deflate). You should ask them if your server supports gzip compression, etc. – otherwise the browser cache feature will not work.
PeterFebruary 28, 2013 at 7:41 am #108830
Those are all your server settings and are independent of any theme. The cookie-free domain is not possible with wordpress otherwise there would be no admin backend. However you can offload all your static content on a CDN (all your images, js and css) A browser can only download 4 items simultaneously from a single domain. So if you put your static content on a different domain (or sub domain like cdn1.your-domain.com) then the browser will be able to download additional content.
w3 total cache is a huge pain in the butt to configurate properly and unless that is done properly it will do absolutely nothing for you. The single best way for you to speed up your site, is by switching from Apache to NginX. The second best way is by using a real cache like APC or Varnish. Ask your host if they have Varnish.
What you can do is add more things to your .htaccess file (download the plugin htaccess ( http://wordpress.org/extend/plugins/wp-htaccess-editor/ ) and then add the parts into your .htaccess file as described here http://www.inboundpro.net/ (Purchase code hidden if logged out) -wordpress-blog
NickFebruary 28, 2013 at 8:22 am #108831
Appreciate both of your responses, I suppose I should’ve given a few more details seeing as to how some things mentioned here pertain to my problems. My domain is hosted on pacifichost. I’ve discovered today through talking with customer support, that they did actually switch their servers over from Apache to NginX a couple of weeks ago. Interestingly enough, I’ve gone back through my website’s history on gtmetrix and…
Test results the week before they made the switch: “http://gtmetrix.com/reports/allurexpressions.com/TZ5YoWhp”.
Before then not only did I have browser caching working, and expire headers, but the majority of the images on my site were served from a cookie-free domain. (I’ve set up a sub-domain for images on my server, those not being served cookie free at that point were theme files for Avisio.) As for W3 Total Cache, it too provided improvement before, however now it only helps page load times and affects nothing else, this I’d assume because page caching is the only thing working.
As for my .htaccess file, nothing I change in it seems to have any affect on the way my site behaves, it’s as if it’s being ignored completely, although W3 Total Cache is able to set page caching through it, my expires headers and other changes are ignored. The resources remain with a 1 day = “86400” expiration. Is this a fault of NginX, is there something I need to change now that they’ve switched to it? I’ve no experience with it, and was not notified of the change until today.February 28, 2013 at 8:29 am #108832
I also noticed, looking through the timeline for both set of results… if you look at the resources it shows they were served from Apache servers before (on February 12th), with cache-control set to “public, must-revalidate, proxy-revalidate”, keep-alive “timeout=5, max=150”.
They are now served from NginX with cache-control set to “max-age=86400”
Pacifichost’s latest response on my support ticket: “Yes, we have rolled out NGINX on juggernaut recently. Please let me know which resources need to be cached or not, and for how long.”
Shouldn’t I be able to control this myself?February 28, 2013 at 12:10 pm #108833
Nginx doesnt use .htaccess files and has a completely different way (a better way) of implementing rewrite rules.. You need to ask your host if you have access to nginx.conf file. Chances are you don’t. Ask them if you have access then to the files for your personal sites in the sites-available folder of nginx.
If you don’t , tell them to add this to the http block of nginx.conf
# Enable Gzip:
gzip_buffers 4 8k;
# text/html is always compressed by HttpGzipModule
Tell your host to also add this to your site definition in the sites-available folder https://github.com/h5bp/server-configs/blob/master/nginx/conf/expires.conf (part of the link below) to correctly set the expire headers.
They should be using this https://github.com/h5bp/server-configs/tree/master/nginx .. which is the standard and since nginx is relatively new, few people know how to correctly configure it and tweak it.
w3 cache plugin works with nginx but you must add a server path to nginx (inside the plugin there is a field for it once it realizes you are using nginx) in order for it to work.
NickMarch 2, 2013 at 9:35 am #108834
Much appreciated! Customer support appears to have fixed the issues: http://gtmetrix.com/reports/allurexpressions.com/fvVMrZJa.
Although they didn’t give me a server path for NginX, nor will I have access to the config file. Should I want to change something, I’ll have to contact them from now on to do it. I have to say, I may very well have preferred Apache, at least then I could do everything myself.March 2, 2013 at 7:06 pm #108835
The topic ‘Leverage Browser Caching | Expires Headers’ is closed to new replies.