【IT专家】利用IIS中的浏览器缓存(谷歌页面显示问题)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

本文由我司收集整编,推荐下载,如有疑问,请与我司联系利用IIS中的浏览器缓存(谷歌页面显示问题) There are several questions about leveraging browser caching but I didn’t find anything useful for how to do this in an application. Google’s Pagespeed tells this is performance biggest problem. So far I did this in my web.config:
 有几个关于利用浏览器缓存的问题,但是我在ASP中没有发现任何有用的东西。

网络应用程序。

谷歌的Pagespeed说这是性能最大的问题。

到目前为止,我在我的web.config:
 system.webServer staticContent !-- clientCache cacheControlMode=“UseExpires” httpExpires=“Fri, 24 Jan 2014 03:14:07 GMT” / -- clientCache cacheControlMode=“UseMaxAge” cacheControlMaxAge=“7.24:00:00” / /staticContent /system.webServer Commented code works. I can set expire header to be some particular time in future but I was not able to set cacheControlMaxAge to set how many days from now static content would be cached. It does not work. My questions is:
 注释代码的工作原理。

我可以将expire header设置为将来的某个特定时间,但是我无法设置cacheControlMaxAge来设置从现在开始静态内容将被缓存的天数。

它不工作。

我的问题是:
How can I do that? I know it is possible to set caching only for specific folder which would be good solution, but it isn’t working also. Application is hosted on Windows Server 2012,on IIS8, application pool is set to classic.
 我该怎么做呢?我知道可以只为特定的文件夹设置缓存,这是一个很好的解决方案,但是它也不能工作。

应用程序托管在Windows Server 2012上,在IIS8上,应用程序池设置为classic。

After I set this code in web config I got pagespeed of 72 (before was 71). 50 files were not cached. (Now 49) I was wondering why and I just realized that one file was actually cached (svg file). Unfortunately png and jpg file were not. This is my web.config
 在web config中设置了这段代码之后,我的页面显示为72(之前是71)。

50个文件。

相关文档
最新文档