Skip to content

Instantly share code, notes, and snippets.

@cedricziel
Created November 12, 2013 17:37
Show Gist options
  • Save cedricziel/7435228 to your computer and use it in GitHub Desktop.
Save cedricziel/7435228 to your computer and use it in GitHub Desktop.
Remove faulty deflate directives for mod_deflate
<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
</IfModule>
@merzilla
Copy link

AddOutputFilterByType DEFLATE text/html text/plain text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript AddOutputFilterByType DEFLATE application/rss+xml
      # Make sure proxies don’t deliver the wrong content
      Header append Vary User-Agent env=!dont-vary

      # enable resulting html compression
      php_flag zlib.output_compression on


      <Directory />
            SetOutputFilter DEFLATE
            BrowserMatch ^Mozilla/4 gzip-only-text/html
            BrowserMatch ^Mozilla/4\.0[678] no-gzip
            SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
            SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
            Options FollowSymLinks
            AllowOverride All
      </Directory>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment