GZip压缩无法在Internet Explorer 11中运行,但在Chrome和Firefox中运行良好

Sun*_*amy 13 spring gzip internet-explorer-11 spring-boot

共同的,

我使用Spring中的CompressingFilter(https://github.com/ziplet/ziplet)和FilterRegistrationBean 在我的Spring Boot Embedded Tomcat中启用了GZip压缩.

它在Chrome和Firefox中运行良好.

  • 我在响应头中获取Content-Encoding = gzip
  • 传输的JSON数据大小从6.5MB减少到1.2 MB - 很棒:-)

但是,同样的代码是不是在工作的Internet Explorer 11.0.9600.18097.

在Internet Explorer中,

  • 响应标头中缺少Content-Encoding = gzip
  • 传输的JSON数据大小仍然只有6.5MB.

我已经粘贴了我的标题(IE11). 在IE11中请求标头

响应标头 -  IE11

任何人都可以帮我解决这个问题吗?

更新: 请在下方找到Chrome标头.

在此输入图像描述

Eri*_*Law 14

Internet Explorer的解压缩逻辑发生在开发人员工具以下的某个级别,因此您可能无法Content-Encoding在开发人员工具中看到它.您应该考虑使用Fiddler来查看线路上的实际内容.