GZip 压缩在 Internet Explorer 11 中不工作,但在 Chrome 和 Firefox 中工作正常
GZip Compression Not working in internet explorer 11, but working fine in Chrome & Firefox
公司,
我在 Spring Boot Embedded Tomcat 中使用 CompressingFilter (https://github.com/ziplet/ziplet) 和来自 Spring 的 FilterRegistrationBean 启用了 GZip 压缩。
它在 Chrome 和 Firefox 中运行良好。
- 我得到 Content-Encoding = gzip 作为响应 headers
- 传输的 JSON 数据大小从 6.5MB 减少到 1.2MB - 太棒了:-)
但是,相同的代码 NOT 在 Internet Explorer 11.0.9600.18097.
中工作
在 Internet Explorer 中,
- Content-Encoding = 响应中缺少 gzip headers
- 已传输 JSON 数据大小仍然只有 6.5MB。
我在下面粘贴了我的 headers ( IE11 )。
谁能帮我解决这个问题?
更新:
请在下面找到 Chrome Headers。
Internet Explorer 的解压缩逻辑发生在开发人员工具之下的级别,因此您可能不会在开发人员工具中看到 Content-Encoding
。您应该考虑使用 Fiddler 来查看线路上的实际情况。
请看link。它被作为一个问题提交,但微软出于某种原因决定不修复 IE11。他们在新的 Edge 浏览器中修复了它。
请查看link提供的评论。
公司,
我在 Spring Boot Embedded Tomcat 中使用 CompressingFilter (https://github.com/ziplet/ziplet) 和来自 Spring 的 FilterRegistrationBean 启用了 GZip 压缩。
它在 Chrome 和 Firefox 中运行良好。
- 我得到 Content-Encoding = gzip 作为响应 headers
- 传输的 JSON 数据大小从 6.5MB 减少到 1.2MB - 太棒了:-)
但是,相同的代码 NOT 在 Internet Explorer 11.0.9600.18097.
中工作在 Internet Explorer 中,
- Content-Encoding = 响应中缺少 gzip headers
- 已传输 JSON 数据大小仍然只有 6.5MB。
我在下面粘贴了我的 headers ( IE11 )。
谁能帮我解决这个问题?
更新: 请在下面找到 Chrome Headers。
Internet Explorer 的解压缩逻辑发生在开发人员工具之下的级别,因此您可能不会在开发人员工具中看到 Content-Encoding
。您应该考虑使用 Fiddler 来查看线路上的实际情况。
请看link。它被作为一个问题提交,但微软出于某种原因决定不修复 IE11。他们在新的 Edge 浏览器中修复了它。
请查看link提供的评论。