IIS Compression Module and Vary: Accept-Encoding Header

后端 未结 2 1892
情话喂你
情话喂你 2021-02-15 16:17

Is there a way to change the IIS compression module so that it does not put in Vary: Accept-Encoding in the Response Headers? I would rather it put in Vary: * or do nothing and

相关标签:
2条回答
  • 2021-02-15 17:12

    This issue is now addressed by an official patch to IIS. To download and further info, visit http://support.microsoft.com/kb/2877816

    Erez Benari, IIS PM

    0 讨论(0)
  • 2021-02-15 17:21

    Ok, apparently the IIS compression module forces the Vary header to be Accept-Encoding no matter what, so caching becomes tricky. For pages with authentication this is bad, because it will not detect that it's different based on the user cookie. I ended up rolling my own compression in my controller and everything works fine now.

    My suggestion- only use IIS static compression, don't use dynamic compression and instead roll your own dynamic compression. It will save you pain in the long run and give you more control.

    0 讨论(0)
提交回复
热议问题