Re: disable gzip based on user-agent

On 10/18/07, Wayne E. Seguin wrote:

I also would like to know if this is possible.

I notice it’s been about five weeks and no answer. :slight_smile:

Since IE6 can have problems with gzip’d CSS, being able to turn it off
for IE6 would be great.

Ian M. Evans ha scritto:

On 10/18/07, Wayne E. Seguin wrote:

I also would like to know if this is possible.

I notice it’s been about five weeks and no answer. :slight_smile:

Since IE6 can have problems with gzip’d CSS, being able to turn it off
for IE6 would be great.

Maybe a redirect based on user agent?

Pseudo code:

location /css {
gzip on;

}

location /css_not_zipped {
gzip off
}

if (IE6) {
rewrite /css /css_not_zipped;
}

Manlio P.

On Tue, Nov 27, 2007 at 02:28:59AM -0500, Ian M. Evans wrote:

On 10/18/07, Wayne E. Seguin wrote:

I also would like to know if this is possible.

I notice it’s been about five weeks and no answer. :slight_smile:

Since IE6 can have problems with gzip’d CSS, being able to turn it off
for IE6 would be great.

Well, I think compressing CSS for MSIE6 should be hardcoded disabled.
Are other modern browsers those have problems with JS or CSS ?

“Igor S.” [email protected] wrote in message
news:[email protected]

Well, I think compressing CSS for MSIE6 should be hardcoded disabled.
Are other modern browsers those have problems with JS or CSS ?

Hmm, I wouldn’t agree that CSS compression for IE6 should be hardcoded
disabled. I’m using CSS compression and never noticed any serious issue
with
IE6.
An option switch would be the best fix IMHO.

Athan

On Tue, Nov 27, 2007 at 10:30:03PM +0800, Eden Li wrote:

Flash in IE6 has issues if you make requests via its ActionScript API.
IE6 tacks on an Accept-Encoding: gzip,default when it makes the
request, but when the server actually returns a gzipped body the Flash
plugin barfs all over it.

Flash in any browser does not understand gzipping and this is well known
fact, at least for me :). I developed mod_deflate for Apache 1.3 long
ago
and had documented this here (in Russian):

http://sysoev.ru/mod_deflate/readme.html#types
http://sysoev.ru/mod_deflate/readme.html#browsers

So the single way is disable gzip in locations which are requested
from Flash. It is not depeneded on browser.

Flash in IE6 has issues if you make requests via its ActionScript API.
IE6 tacks on an Accept-Encoding: gzip,default when it makes the
request, but when the server actually returns a gzipped body the Flash
plugin barfs all over it.

I haven’t seen any other corner cases like this, but I’m sure there’s
another one out there. I’ve just disabled gzip encoding for
mime-types that are limited to what our Flash app is pulling, but it’d
be nice to switch it on and off without having to resort duplicating
rules in different location bodies. IE6 is still the dominant
browser, unfortunately.

On Tue, Nov 27, 2007 at 11:29:06PM +0800, Eden Li wrote:

Hmm, I’ve been running a separate webserver that has a rule that says
“only gzip for non-IE6 browsers” without issue, so maybe it’s been
fixed in Opera and Firefox (and other mainstream browsers), but not
IE6.

Well, I will retest it with modern browsers.

Anyway, is there any possible way to disable gzip based on user agent
via some directive?

Now - not. However, I will add something in 0.6.19 or so.

Hmm, I’ve been running a separate webserver that has a rule that says
“only gzip for non-IE6 browsers” without issue, so maybe it’s been
fixed in Opera and Firefox (and other mainstream browsers), but not
IE6.

Anyway, is there any possible way to disable gzip based on user agent
via some directive?