C# 利用浏览器缓存功能';t缓存Javascript和CSS文件
我有一个网站运行在IIS7,C#.Net 4上,我使用web.config文件将浏览器缓存设置为14天:C# 利用浏览器缓存功能';t缓存Javascript和CSS文件,c#,asp.net,caching,iis-7,web-config,C#,Asp.net,Caching,Iis 7,Web Config,我有一个网站运行在IIS7,C#.Net 4上,我使用web.config文件将浏览器缓存设置为14天: <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="14.00:00:00" /> 它同时经过14天和1天,1天设置是最重要的值 有人知道这是为什么或如何发生的吗?请尝试按照system.webServer标记下的代码更新您的web配置 <cac
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="14.00:00:00" />
它同时经过14天和1天,1天设置是最重要的值
有人知道这是为什么或如何发生的吗?请尝试按照system.webServer标记下的代码更新您的web配置
<caching>
<profiles>
<add extension=".js" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
<add extension=".css" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
</profiles>
</caching>
<staticContent>
<clientCache cacheControlCustom="public"
cacheControlMode="UseMaxAge"
cacheControlMaxAge="14.00:00:00" />
</staticContent>
您检查过了吗?
<caching>
<profiles>
<add extension=".js" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
<add extension=".css" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
</profiles>
</caching>
<staticContent>
<clientCache cacheControlCustom="public"
cacheControlMode="UseMaxAge"
cacheControlMaxAge="14.00:00:00" />
</staticContent>