为IE6客户端禁用GZIP压缩 [英] Disable GZIP compression for IE6 clients

查看:119
本文介绍了为IE6客户端禁用GZIP压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要有条件地禁用GZIP压缩,如果用户的浏览器是IE6(它挂起浏览器5分钟)在较大的网站的几个页面。服务器是IIS7和静态内容打开压缩 - 希望该压缩保持工作,如果用户代理不是Mozilla / 4.0。 ASPX代码样本任何人?
或者,有条件地重定向到另一个站点上的同一页面的代码(可以创建另一个压缩禁用的虚拟站点),但需要传递所有参数(GET / POST)。

We need to conditionally disable GZIP compression if user's browser is IE6 (it hangs browser for 5min) in few pages of larger site. Server is IIS7 and has compression for static content turned on - want that compression left working if user agent is not Mozilla/4.0. ASPX code sample anyone? Alternatively, code to conditionally redirect to the same page on another site (could create another virtual site with compression disabled) but need to pass all parameters (GET/POST).

推荐答案

查看此页。我相信ISAPI重写也可用于IIS。基本上,它需要浏览器的请求,并重写它停止声称浏览器支持gzip,在IE5 / IE6的情况下。

Check out this page. I believe ISAPI rewrite is available for IIS as well. Basically, it takes the browser's request and rewrites it to stop claiming the browser supports gzip, in the case of IE5/IE6.

注意:这不需要你有单独的gzip和非gzip页面。这可能是比你的建议更好的方法,因为它从根源上解决了问题。

Take note: this does not require you to have separate gzipped and non-gzipped pages. This is probably a better approach than your proposal, since it cuts the problem at its source.

这篇关于为IE6客户端禁用GZIP压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆