GZIP压缩在IE 8 ASP.NET中不起作用

时间:2021-04-09 03:18:24

I'm using IIS6 and Windows 2003 server where I enabled gzip compression for my MVC project. I thought I got it working, but once I tested in IE it did not work. I feels like it does not recognize the gzip compression or something. It works fine in Fire Fox (version 13).

我正在使用IIS6和Windows 2003服务器,在那里我为我的MVC项目启用了gzip压缩。我以为我能把它修好,但一旦我在IE上测试就不行了。我觉得它好像不认识gzip压缩之类的东西。它在Fire Fox(第13版)中运行良好。

Do I need to configure something?

我需要配置什么东西吗?

I do a HTTP post to get some data.

我通过HTTP post获取一些数据。

Header:

标题:

HTTP/1.1 200 OK
Cache-Control: private
Date: Tue, 13 Nov 2012 21:33:19 GMT
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
X-AspNetMvc-Version: 3.0
Content-Encoding: gzip
Vary: Accept-Encoding
Transfer-Encoding: chunked

If you need anything else please let know.

如果你还需要什么,请告诉我。

Thanks

谢谢

1 个解决方案

#1


1  

IIS does not perform HTTP compression on "dynamic" resources by default, only "static" files. This is because it caches the compressed results in IIS's temporary files directory, whereas dynamic content compression means it has to compress it every time its requested, which can burden the server if it's handling a lot of requests.

IIS默认情况下不会对“动态”资源执行HTTP压缩,只会对“静态”文件执行。这是因为它将压缩结果缓存到IIS的临时文件目录中,而动态内容压缩意味着每次请求时都要压缩压缩压缩结果,如果服务器处理大量请求,这会给服务器带来负担。

I also note that you're using IIS6 which is very antiquated at this point, but check out the documentation here: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true

我还注意到您正在使用IIS6,这在目前是非常过时的,但是请查看这里的文档:http://www.microsoft.com/technet/prodtechnol/windowsserver2003 / library/iis/502ef631-3695-4616 -b268-cbe7cf1351ce.mspx?

#1


1  

IIS does not perform HTTP compression on "dynamic" resources by default, only "static" files. This is because it caches the compressed results in IIS's temporary files directory, whereas dynamic content compression means it has to compress it every time its requested, which can burden the server if it's handling a lot of requests.

IIS默认情况下不会对“动态”资源执行HTTP压缩,只会对“静态”文件执行。这是因为它将压缩结果缓存到IIS的临时文件目录中,而动态内容压缩意味着每次请求时都要压缩压缩压缩结果,如果服务器处理大量请求,这会给服务器带来负担。

I also note that you're using IIS6 which is very antiquated at this point, but check out the documentation here: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true

我还注意到您正在使用IIS6,这在目前是非常过时的,但是请查看这里的文档:http://www.microsoft.com/technet/prodtechnol/windowsserver2003 / library/iis/502ef631-3695-4616 -b268-cbe7cf1351ce.mspx?