• I just installed WP Super Cache and activated the caching module, but for some reason it is not activating gzip compression, nor leveraging browser caching.

    Any tips on how to get it to do both of these things please?

    I am using the Pressive theme by Thrive Themes if that helps?

    Thanks in advance for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • In htaccess add “AddOutputFilterByType DEFLATE image/gif image/png image/jpeg” etc

    check it at redbot.org

    @ezza17au Go to WP Super Cache Advanced tab and ensure that you have selected the option “Compress pages so they’re served more quickly to visitors. (Recommended)”. For best results you should also use the mod_rewrite caching option then Click Update Status. Then scroll down to Update mod_rewrite rules and click it. The plugin can handle making all the correct updates to .htaccess for g-zip as long as you have the file permissions configured correctly.

    Then manually add the following to the .htaccess after the supercache rules for browser caching:

    ExpiresActive On
    ExpiresByType image/jpeg "access plus 30 days"
    ExpiresByType image/x-icon "access plus 90 days"
    ExpiresByType image/png "access plus 30 days"
    ExpiresByType image/gif "access plus 30 days"
    ExpiresByType text/css   "access plus 30 days"
    ExpiresByType application/x-javascript  "access plus 30 days"

    There are other expires that you can add depending on your requirements, e.g. .svg, audio, video, etc. You can google to get the mime type expression for each and use a similar format as above. Typically, audio and video you would add a much longer expiry date like “access plus 6 months” or “access plus 12 months”.

    Cheers,
    Pat

    or ExpiresByType text/css “modification plus 1 month”

    so if you change css …

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How do I activate gzip & browser caching?’ is closed to new replies.