Apache mod_deflate doesn’t work with IE 7

apache-2.2internet-explorer-7mod-deflate

I've set up apache2 to serve gziped files

AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript application/json
   BrowserMatch ^Mozilla/4 gzip-only-text/html
   BrowserMatch ^Mozilla/4.0[678] no-gzip
   BrowserMatch bMSIE !no-gzip !gzip-only-text/html
   DeflateCompressionLevel 9
   SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0

It works perfectly when I test file on safari or chrome, or event with curl
(curl –header 'accept-encoding: gzip' url), but it doesn't seem to work on IE7.

I tested with http://www.webpagetest.org/.

Am I doing something wrong ?

Thanks

Best Answer

This would be the problem. You are explicitly telling it not to gzip for MSIE (Microsoft Internet Explorer) browsers.

"BrowserMatch bMSIE !no-gzip !gzip-only-text/html"

Looks like you are using the default rules. MSIE 5.5 and 6 had problem with gzip for which the fix was to not zip the content when serving to those browsers.

The link below should help you understand it better.

http://sebduggan.com/posts/ie6-gzip-bug-solved-using-isapi-rewrite