IIS的COM pression模块,具体费用:Accept-Encoding头 [英] IIS Compression Module and Vary: Accept-Encoding Header

查看:178
本文介绍了IIS的COM pression模块,具体费用:Accept-Encoding头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来改变IIS COM pression模块,这样就不会放在有所不同:接受编码的响应头?我宁愿它放在有所不同:*或什么都不做,让我把这个值在自己...

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 let me put that value in myself...

推荐答案

好吧,显然是IIS COM pression模块势力Vary标头是接受编码不管是什么,所以缓存变得棘手。对于认证页面,这是不好的,因为它不会检测到它根据用户的cookie是不同的。我结束了我自己的滚动COM pression在我的控制器和现在的一切工作正常。

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.

我只suggestion-使用IIS静态COM pression,不使用动态COM pression,而是推出自己的动态COM pression。它会痛节省您从长远来看,给你更多的控制。

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.

这篇关于IIS的COM pression模块,具体费用:Accept-Encoding头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆