在IIS中仅为网站上的一个特定应用程序禁用缓存

2cmtqfgy  于 8个月前  发布在  其他
关注(0)|答案(1)|浏览(66)

是否可以只在网站上的一个特定应用程序上禁用aspx,ashx和JavaScript文件的缓存,而不是全局的网站?可以在应用程序的本地web.config中完成吗?

iovurdzv

iovurdzv1#

您可以尝试将以下内容添加到web.config中:

<configuration>
  <location path="index.html">
    <system.webServer>
      <httpProtocol>
        <customHeaders>
          <add name="Cache-Control" value="no-cache" />
        </customHeaders>
      </httpProtocol>
     </system.webServer>
  </location>
</configuration>

字符串

相关问题