开发者

IIS Compression Module and Vary: Accept-Encoding Header

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 V开发者_高级运维ary: * or do nothing and let me put that value in myself...


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


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜