IE 6, Apache mod_deflate, blank pages…

I just ran across an interesting bug in IE 6 when a page is loading an external javascript file. If Apache is outputting the external javascript compressed (gzip) IE will do one of the following things:

  1. Return a blank page
  2. Try loading the page forever

Prior to finding this bug, our apache settings for mod_deflate looked like…

AddOutputFilterByType DEFLATE text/html text/css text/xml text/plain application/x-javascript

Now it looks like…

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.[0678] no-gzip
BrowserMatch \bMSIE\s7Â !no-gzip !gzip-only-text/html

Making these changes seemed to have fixed the issue. Now when a page is loaded in IE6, any external javascript file will not be gzipped and their page load will be slower. I suppose that is punishment for not upgrading to IE7 or getting Firefox.

One Response to “IE 6, Apache mod_deflate, blank pages…”

  1. Avatar Ismael Says:

    I must say this. I’ve been struggling with this issue for days, copletely clueless. You may have saved my life.

    Thanks for an excellent catch!

Leave a Reply