某些东西迫使响应具有缓存控制: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>
告诉我们进展如何.
杰森
这篇关于某些东西迫使响应具有缓存控制:IIS7 中的私有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文