0

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

jlfenaux
  • 283
  • 1
  • 4
  • 8

2 Answers2

1

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

Sameer
  • 4,070
  • 2
  • 16
  • 11
1

You can fix this very easily be having it match everything under 7; replace your match with:

BrowserMatch \bMSIE\s7  !no-gzip !gzip-only-text/html

This will keep it enabled for IE7 and on.

lbiegaj
  • 3
  • 2
Andrew M.
  • 10,982
  • 2
  • 34
  • 29