• After running Page Insights I get this on ALL PAGES for LEVERAGE BROWSER CACHING:

    The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:

    Go to external link:
    http://www.WEBSITE.com/wp-content/cache/minify/000000/1de6d/default.include.355aff.css

    Go to external link:
    http://www.WEBSITE.com/wp-content/cache/minify/000000/1de6d/page.include.868bac.js

    I am running w3 Total cache and thought I configured it correctly with expiration dates set to expire headers: 31536000 seconds
    cache with max-age and validation

    If I need to put css file in the header, which php file do I need to go to so as to cut and paste this file (customheader.php, function.php?) I am not a coder so have no clue. Is there something I can copy/paste in the htaccess file?

    i’ve already added this (in addition to the w3 total cache settings)

    # BEGIN Far Future Expiration Plugin
    <IfModule mod_expires.c>
    <FilesMatch “\.(gif|jpeg|jpg|png|ico|js|css)$”>
    ExpiresDefault “access plus 1095 hours”
    </FilesMatch>
    </IfModule>
    # END Far Future Expiration Plugin

    Header set cache-control “public”

    <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 3 months”
    # Javascript
    ExpiresByType application/javascript “access plus 1 year”
    </IfModule>

  • The topic ‘How to leverage browser caching’ is closed to new replies.