Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Overbryd/128615 to your computer and use it in GitHub Desktop.
Save Overbryd/128615 to your computer and use it in GitHub Desktop.
# compression ftw
<Location />
<ifmodule mod_deflate.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# compress content with type html, text, and css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
<ifmodule mod_headers.c>
# properly handle requests coming from behind proxies
Header append Vary User-Agent
</ifmodule>
</ifmodule>
</Location>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment