Leverage Browser Caching in WordPress via .htaccess


/ Published in: Apache
Save to your folder(s)

"We should always be looking for ways to improve the functionality of our blogs. One of the easiest ways to improve our blog functionality and speed is to leverage browser caching."


Copy this code and paste it in your HTML
  1. ## EXPIRES CACHING ##
  2.  
  3. ExpiresActive On
  4. ExpiresByType image/jpg "access 1 year"
  5. ExpiresByType image/jpeg "access 1 year"
  6. ExpiresByType image/gif "access 1 year"
  7. ExpiresByType image/png "access 1 year"
  8. ExpiresByType text/css "access 1 month"
  9. ExpiresByType application/pdf "access 1 month"
  10. ExpiresByType text/x-javascript "access 1 month"
  11. ExpiresByType application/x-shockwave-flash "access 1 month"
  12. ExpiresByType image/x-icon "access 1 year"
  13. ExpiresDefault "access 2 days"
  14.  
  15. ## EXPIRES CACHING ##

URL: http://thomasgriffinmedia.com/blog/2010/11/how-to-leverage-browser-caching-in-wordpress-via-htaccess/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.