Skip to content

Instantly share code, notes, and snippets.

@esedic
Created June 7, 2014 08:07
Show Gist options
  • Save esedic/8b8c97ce350772ba5ce2 to your computer and use it in GitHub Desktop.
Save esedic/8b8c97ce350772ba5ce2 to your computer and use it in GitHub Desktop.
Browser caching in .htaccess
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType etc, etc.
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment