Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #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: “” 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!



    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.





    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 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 ( ) and then add the parts into your .htaccess file as described here (Purchase code hidden if logged out) -wordpress-blog




    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: “”.

    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.


    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?



    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 on;
    gzip_http_version 1.0;
    gzip_comp_level 5;
    gzip_min_length 512;
    gzip_buffers 4 8k;
    gzip_proxied any;
    # text/html is always compressed by HttpGzipModule

    gzip_disable "msie6";
    gzip_vary on;

    Tell your host to also add this to your site definition in the sites-available folder (part of the link below) to correctly set the expire headers.

    They should be using this .. 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.




    Much appreciated! Customer support appears to have fixed the issues:

    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.



    Upgrade your hosting package to shared vps and you will have root access but a headache of trying to figure out how to do anything. It’s best to bother the host then having to do it yourself and nginx demolishes apache speed wise.

    Good luck!


Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Leverage Browser Caching | Expires Headers’ is closed to new replies.