Leverage Browser Caching using .htacess file
-
Hi,
I checked my site’s speed using Google PageSpeed InsightsI am already using following plugins for the Page Speed:
1. Above The Fold Optimization
2. Autoptimize
3. Leverage Browser Caching
4. Remove Query Strings From Static Resource
5. WP SmushI am also using Yoast SEO and updated the .htacess file with following code
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "max-age=84600, public" </filesMatch> # LBROWSERCSTART Browser Caching <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access 1 year" ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType image/x-icon "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/javascript "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/javascript "access 1 month" ExpiresByType application/x-javascript "access 1 month" ExpiresByType application/xhtml-xml "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresDefault "access 1 month" </IfModule> # END Caching LBROWSERCEND
While I checked my site’s speed using Google’s PageSpeed Insights I am still getting the Possible Optimization Suggestion on Leverage Browser Caching for following
https://platform.twitter.com/widgets.js (30 minutes) https://connect.facebook.net/en_US/sdk.js (20 minutes) https://[MY BLOG URL GOES HERE]/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.woff (expiration not specified) https://www.google-analytics.com/plugins/ua/linkid.js (60 minutes) https://www.google-analytics.com/analytics.js (2 hours)
So where to write the specific code for the above suggestion?
Additionally:
I also checked individual pages and for each pages, Google has certain suggestions. So is there any method to generalize it?
- The topic ‘Leverage Browser Caching using .htacess file’ is closed to new replies.