[jQuery] jQuery + gzip + IE6
I wonder if anyone has any tips/experiences to share regarding gzip
compression and IE6. Where the compression takes place (mod_deflate,
mod_gzip, php) does not matter. There's a known issue with IE6 and
compressed style sheets, but when I install IE6 out of the box, jquery
also has this issue. The issue is that every once in a while (like 1
in 5), the javascript is not loaded properly.
I've been running this compression config for a while:
------------------------
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE no-gzip
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|zip|gz)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
--------------------------
Part is from the standard Apache documentation, but the line
BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html was added to
make compression work for IE7, but disable it for IE6.
This is a pitty, because IE6 is still the most used browser.
This is means the jQuery minified/gzipped setup is nice, but in
practise not usable for IE6 out-of-the-box.
Now I'm running IE6 using one of those multiple-IE tools. I wonder
what the difference is with later versions of IE6/service packs.
Supposedly the problem is only with CSS, but perhaps this was fixed
later and the initial IE6 has worse bugs? If this is the case and a
vast majority of IE6 users is running a version which can handle
compressed javascript properly, I might be able to turn compression on.