有些东西迫使响应具有缓存控制:IIS7中的私有 [英] Something is forcing responses to have cache-control: private in IIS7
本文介绍了有些东西迫使响应具有缓存控制:IIS7中的私有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的web.config中有这个:
I have this in my web.config:
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="Cache-Control" value="max-age=30,public" />
</customHeaders>
</httpProtocol>
</system.webServer>
但是当我加载页面时,这是响应头:
But when I load the page, this is the response header:
Cache-Control: private,max-age=30,public
这是一个ASP.NET MVC应用程序,控制器没有指定任何地方的缓存指令。
It is an ASP.NET MVC application, the controller has no cache directives specified anywhere.
推荐答案
试试这个
<system.web>
<httpRuntime sendCacheControlHeader="false" />
</system.web>
让我们知道它是怎么回事。
Let us know how it goes.
杰森
这篇关于有些东西迫使响应具有缓存控制:IIS7中的私有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文