Loading

Leverage Browser Caching

  1. <IfModule mod_expires.c>
  2.   ExpiresActive On
  3.  
  4.   # Images
  5.   ExpiresByType image/jpeg "access plus 1 year"
  6.   ExpiresByType image/gif "access plus 1 year"
  7.   ExpiresByType image/png "access plus 1 year"
  8.   ExpiresByType image/webp "access plus 1 year"
  9.   ExpiresByType image/svg+xml "access plus 1 year"
  10.   ExpiresByType image/x-icon "access plus 1 year"
  11.  
  12.   # Video
  13.   ExpiresByType video/mp4 "access plus 1 year"
  14.   ExpiresByType video/mpeg "access plus 1 year"
  15.  
  16.   # CSS, JavaScript
  17.   ExpiresByType text/css "access plus 1 month"
  18.   ExpiresByType text/javascript "access plus 1 month"
  19.   ExpiresByType application/javascript "access plus 1 month"
  20.  
  21.   # Others
  22.   ExpiresByType application/pdf "access plus 1 month"
  23.   ExpiresByType application/x-shockwave-flash "access plus 1 month"
  24. </IfModule>