mod_deflate and IE6 bug
published 20 April 2007
This one was very strange. IE 6.0.29 would randomly come up with white pages. On the local servers it would come up fine, and so it did in any other version of IE, nor when using the multiple IE installer.
Trying to use Charles to sincerely scrutinize the headers and output for dodgy characters made the problem just go away.
Turns out that the gzip compression added by mod_deflate just wasn't well digested. The following lines in the http.conf caused the misery.
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\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Changing the last two lines would turn off the mod_deflate compression for IE6 but leave it in for IE7:
BrowserMatch ^Mozilla/4\.[0678] no-gzip
BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html
For testing the HTTP headers that come through one can use the ieHTTPHeaders plugin for IE or Rex Swain's HTTP viewer.
Happy Debugging!
Comment
- If you need to examine HTTP traffic on a Windows box, you can’t really do better than Fiddler, an HTTP debugging proxy written by Eric Lawrence of Microsoft. It’s free, and as well as allowing you to inspect HTTP traffic, it can be extended (via JScript.NET) with scripted rules and custom inspectors.
It’s available at http://fiddlertool.com, if the link above doesn’t show up (it doesn’t appear on preview).
— Nick Fitzsimons 22 April, 5:54pm #
- “Internet Explorer May Lose the First 2,048 Bytes of Data That Are Sent Back from a Web Server That Uses HTTP Compression”
support.microsoft.com
or
“BUG: Script Errors with Cache-Control:no-cache HTTP Header and HTTP Compression”
support.microsoft.com
just to name a few.
— maurizio 16 January, 1:44pm #
- May I suggest a tweak for the MSIE line, as Internet Explorer 8 isn’t far off and your current configuration doesn’t take it into account. The following line should enable compression for IE7 and 8.
BrowserMatch bMSIEs(7|8) !no-gzip !gzip-only-text/html
— gordon 24 July, 10:45am #
Quick links
Other people's articles that we think you might be interested in:
- Ajaxian » Web Inspector: Looking good, and profiling nicely
- smush it!
- cssdoc - Trac
- CSS Systems for writing maintainable CSS | Natalie Downe
- The PNG Gamma Dilemma - Trevor Morris Photographics
Want to buy a cheap laptop for your design work? read laptop reviews at laptopical.com