Skip to content

Instantly share code, notes, and snippets.

@johntron
Created May 15, 2013 03:10
Show Gist options
  • Save johntron/5581403 to your computer and use it in GitHub Desktop.
Save johntron/5581403 to your computer and use it in GitHub Desktop.
<IfModule mod_deflate.c>
# these are known to be safe with MSIE 6
AddOutputFilterByType DEFLATE text/html text/plain text/xml
# everything else may cause problems with MSIE 6
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
AddOutputFilterByType DEFLATE application/rss+xml
ExpiresActive On
ExpiresDefault "access plus 15 minutes"
ExpiresByType text/html "access"
ExpiresByType application/json "access"
ExpiresByType text/css "access plus 1 week"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment