IIS application missing Content-Encoding - gzip in Response Header

前端 未结 3 1004
陌清茗
陌清茗 2020-12-30 08:39

In Firebug the request header has the following entry:
Accept-Encoding: gzip, deflate

But there\'s no:
Content-Encoding: gzip

3条回答
  •  无人及你
    2020-12-30 09:37

    I have just had the same problem. The cause ended up being the dynamicCompressionBeforeCache="true" setting. Changing this attribute to "false" fixed the problem.

    
    

    I run a few sites on a shared server provided by SmarterASP.Net. I raised a support ticket with them and along the way I determined dynamicCompressionBeforeCache="true" to be the culprit.

    I pointed them to the Microsoft documentation covering this attribute, at https://docs.microsoft.com/en-us/iis/configuration/system.webserver/urlcompression, and asked them why a setting of "true" would be causing this issue.

    SmarterASP.Net support referred to a section of the documentation stating...

    If the dynamicCompressionBeforeCache attribute is true when the output cache response has been flushed, dynamic compression will not be performed before the response is put into the output cache.

    ...and they said...

    "We do not save output cache in our server end. So the output cache responses always got flushed and caused the issue."

    I can't say that I fully understand the mechanics here, or why SmarterASP.Net don't save the output cache. But a setting of dynamicCompressionBeforeCache="false" definitely solved the problem for me.

提交回复
热议问题