Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Brin Wilson

    (@brin)

    I’ve tried adding the below (from: https://gtmetrix.com/add-expires-headers.html) to my htaccess file, but no luck… anybody?

    <IfModule mod_expires.c>
    # Enable expirations
    ExpiresActive On
    # Default directive
    ExpiresDefault “access plus 1 month”
    # My favicon
    ExpiresByType image/x-icon “access plus 1 year”
    # Images
    ExpiresByType image/gif “access plus 1 month”
    ExpiresByType image/png “access plus 1 month”
    ExpiresByType image/jpg “access plus 1 month”
    ExpiresByType image/jpeg “access plus 1 month”
    # CSS
    ExpiresByType text/css “access 1 month”
    # Javascript
    ExpiresByType application/javascript “access plus 1 year”
    </IfModule>

    That’s the correct code. As you can see on the first line of the code, the rest of the code works only if your host has mod_expires module. Even if a host has mod_expires, there may be some limitations on how to enable it for a particular site. It’s best to check with the host on how to enable / use it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP Super Cache with header expires – YSlow rating’ is closed to new replies.