6

我的 web.config 中有这个:

<system.webServer>
      <httpProtocol>
          <customHeaders>
              <clear />
              <add name="Cache-Control" value="max-age=30,public" />
          </customHeaders>
      </httpProtocol>
</system.webServer>

但是当我加载页面时,这是响应标头:

Cache-Control: private,max-age=30,public

它是一个 ASP.NET MVC 应用程序,控制器在任何地方都没有指定缓存指令。

4

1 回答 1

5

尝试这个

<system.web>
    <httpRuntime sendCacheControlHeader="false" /> 
 </system.web>

让我们知道怎么回事。

杰森

于 2015-10-11T13:50:04.910 回答