Skip to content

Instantly share code, notes, and snippets.

@TorbenL
Created May 5, 2015 08:19
Show Gist options
  • Select an option

  • Save TorbenL/05ec9589e8314f315316 to your computer and use it in GitHub Desktop.

Select an option

Save TorbenL/05ec9589e8314f315316 to your computer and use it in GitHub Desktop.
Komprimierung von statischen Ressourcen
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/javascript
  # ...
</IfModule>
<IfModule mod_gzip.c>
  mod_gzip_on       Yes
  mod_gzip_dechunk  Yes
  mod_gzip_item_include file      \.(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler   ^cgi-script$
  mod_gzip_item_include mime      ^text/.*
  mod_gzip_item_include mime      ^application/x-javascript.*
  mod_gzip_item_exclude mime      ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment