Skip to content

Instantly share code, notes, and snippets.

@bonnerl
Created January 29, 2014 20:37
Show Gist options
  • Select an option

  • Save bonnerl/8696485 to your computer and use it in GitHub Desktop.

Select an option

Save bonnerl/8696485 to your computer and use it in GitHub Desktop.
Enable Browser Caching (.htaccess)
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 weeks"
ExpiresByType image/jpeg "access plus 1 weeks"
ExpiresByType image/gif "access plus 1 weeks"
ExpiresByType image/png "access plus 1 weeks"
ExpiresByType image/x-icon "access plus 1 weeks"
ExpiresByType image/svg+xml "access plus 1 weeks"
ExpiresByType text/css "access plus 1 weeks"
ExpiresByType text/javascript "access plus 1 weeks"
ExpiresByType text/x-javascript "access plus 1 weeks"
ExpiresByType application/javascript "access plus 1 weeks"
ExpiresByType application/pdf "access plus 1 weeks"
ExpiresByType application/x-shockwave-flash "access plus 1 weeks"
ExpiresByType application/x-font-woff "access plus 1 weeks"
ExpiresByType application/vnd.ms-fontobject "access plus 1 weeks"
ExpiresByType application/x-font-ttf "access plus 1 weeks"
ExpiresDefault "access plus 1 minutes"
</IfModule>
## END BROWSER CACHING ##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment