【发布时间】:2011-07-10 23:41:07
【问题描述】:
Google PageSpeed 建议将以下内容作为我的网站的高优先级。
以下可缓存资源的新鲜度生命周期较短。 为以下内容指定至少一周后的到期时间 资源:
并建议further reading。
我正在使用 Windows Server 2008 r2、.net 框架 4.0、asp.net 和 IIS 7.5。如何增加某些文件的缓存过期时间?
我已经尝试了以下 web.config,但它不起作用。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<sessionState mode="Off" />
</system.web>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
</system.webServer>
</configuration>
【问题讨论】: