WordPress.org

Support

Support » Multisite » [Resolved] Adding expires headers in wordpress multisite

[Resolved] Adding expires headers in wordpress multisite

  • hello,
    i’ve been setting belgranostudio.com .htaccess file, with all the expire and gzip compresion settings that I could find on the web, and my tests have really improved. I’ve implemented a CDN also, Cloudflare.
    But this settings don’t seem to affect the subdomains performance that much; everyhing is going faster, anyway.
    I don’t want to use a plugin like W3; if there’s some other solution, I’ll be glad to hear it.

    Thanks everybody !
    L.

Viewing 13 replies - 1 through 13 (of 13 total)
  • .htaccess rules apply to all subdomains on the network, same as the main site.

    YSlow gives me very different metrics, between the main site and the subdomain…
    thanks !

    And yet it marks in the subdomain some issues that it doesn’t on the main site…

    *eyes ySlow*

    I get the same results on my domain, mapped domain, and subdomain.

    Can you share your sites?

    They’re
    belgranostudio.com
    and
    online.belgranostudio.com
    But I’ve got them behind a ‘comming soon’ plugin, until they’re ready.
    Whenever you tell me I can disable the plugin to let you do the tests.

    Right now, and for a couple of hours, i’m gonna have the sites online.

    Here are the results of gmetrix,
    http://gtmetrix.com/compare/5wbxh1it/cPIGGvRO

    Are the sites running the same theme and plugins? You’d have to look at WHAT it’s barking at, since I know I regularly get yelled at because Google’s not got the right expires on their own JS.

    Yes, same theme. Same plugins.
    I’ll check what you’re saying.
    Thanks !

    Assuming you put the expires in your .htaccess… what’d you put? 🙂

    I used this:

    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType image/jpg "access 1 year"
        ExpiresByType image/jpeg "access 1 year"
        ExpiresByType image/gif "access 1 year"
        ExpiresByType image/png "access 1 year"
        ExpiresByType image/x-icon "access 1 year"
    
        ExpiresByType text/css "access 1 month"
        ExpiresByType text/html "access 1 hour"
    
        ExpiresByType application/pdf "access 1 month"
        ExpiresByType application/x-javascript "access 1 month"
        ExpiresByType application/javascript "access 1 month"
        ExpiresByType text/javascript "access 1 month"
        ExpiresByType text/x-js "access 1 month"
    
        ExpiresByType application/x-shockwave-flash "access 1 month"
    
        ExpiresByType video/quicktime "access 1 month"
        ExpiresByType audio/mpeg "access 1 month"
        ExpiresByType video/mp4 "access 1 month"
        ExpiresByType video/mpeg "access 1 month"
        ExpiresByType audio/ogg  "access 1 month"
        ExpiresByType video/ogg  "access 1 month"
    
        ExpiresDefault "access 2 days"
    </IfModule>

    I used this. Dont remember where I got it from.

    ## EXPIRES CACHING ##
    
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 7 days"
    </IfModule>
    
    ## EXPIRES CACHING ##

    It looks almost identical.
    Anyway, I’m relying on Cloudflare to make my sites faster; I don’t think I’m going to spend mucho more time on this issue.
    Things are going fast enough for me. Still surprised !!.
    Cheers !!.

    I went with mod_pagespeed to make things zippier 😉 I don’t like CDNs.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] Adding expires headers in wordpress multisite’ is closed to new replies.
Skip to toolbar