Gle*_*ven 6 iis-7 web-config cache-control http-headers
我在web.config中有这个:
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="Cache-Control" value="max-age=30,public" />
</customHeaders>
</httpProtocol>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
但是当我加载页面时,这是响应头:
Cache-Control: private,max-age=30,public
Run Code Online (Sandbox Code Playgroud)
它是一个ASP.NET MVC应用程序,控制器没有指定任何位置的缓存指令.
小智 5
尝试这个
<system.web>
<httpRuntime sendCacheControlHeader="false" />
</system.web>
Run Code Online (Sandbox Code Playgroud)
让我们知道怎么回事。
杰森
| 归档时间: |
|
| 查看次数: |
4117 次 |
| 最近记录: |