[Plugin: WP Faster Cache] Leverage Browser Caching
-
With WP Faster Cache running, the GTMetrix rating for browser caching on my site is a miserable 15 (F).
The explanation reads “The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:” (but it doesn’t tell me how to specify them) and 11 resources are listed with “expiration not specified” after them. These are css, js, jpg, png files.
Is there a setting for WP Faster Cache to correct this, or is it done in the .htaccess file, or somewhere else in WordPress?
GTMetrix on their browser cacheing explanation page has about a dozen lines for a .htaccess file to indicate expiration times for different types of files:
## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/pdf "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 2 days" </IfModule>
However, WP Faster Cache already has directives in the .htaccess file:
<FilesMatch "\.(html|htm|shtml)$"> FileETag None <ifModule mod_headers.c> Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Mon, 29 Oct 1923 20:30:00 GMT" </ifModule> </FilesMatch>
I have no idea what these mean or why they seem limited to html,htm,shtml files. Can someone give me a recommendation on how to improve this function?
Thanks,
Peter
My hosting company definitely has mod_headers.c running on the server.
- The topic ‘[Plugin: WP Faster Cache] Leverage Browser Caching’ is closed to new replies.