Skip to content

Instantly share code, notes, and snippets.

@leanda
Created June 22, 2013 15:41
Show Gist options
  • Save leanda/5841319 to your computer and use it in GitHub Desktop.
Save leanda/5841319 to your computer and use it in GitHub Desktop.
gzip compression
# Gzip compression allows us to drastically reduce out file sizes. This .htaccess snippet does the gzipping for us..
<IfModule mod_deflate.c>
# html, xml, css, and js:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json
# webfonts and svg:
<FilesMatch "\.(ttf|otf|eot|svg)$" >
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment