IIS7 + ASP.NET MVC Client Caching Headers Not Working

后端 未结 1 734
悲哀的现实
悲哀的现实 2020-12-21 09:09

I\'ve deployed an ASP.NET MVC app on IIS7 and Windows Server 2008.

I\'ve read posts on here, and around the web, but can\'t get the darn client-side caching to work.

相关标签:
1条回答
  • 2020-12-21 09:32

    If you can't get it working using the IIS admin tool, try Jeff Atwood's recommendation from this thread:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
        <staticContent>
          <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
        </staticContent>
      </system.webServer>
    </configuration>
    
    0 讨论(0)
提交回复
热议问题