Disable GZIP compression for IE6 clients(禁用 IE6 客户端的 GZIP 压缩)
问题描述
如果用户的浏览器是 IE6(它会在较大站点的几个页面中挂起浏览器 5 分钟),我们需要有条件地禁用 GZIP 压缩.服务器是 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).
推荐答案
如果请求来自 IE5/IE6,请尝试拦截浏览器的请求以停止声称支持 Gzip.我相信 ISAPI 重写可用于 IIS.
Try intercepting the browser's request to stop claiming support for Gzip, if the request is from IE5/IE6 . I believe ISAPI rewrite is available for IIS.
请注意:这并不要求您拥有单独的 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 压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:禁用 IE6 客户端的 GZIP 压缩


- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- 输入按键事件处理程序 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04