如何利用浏览器缓存在ASP.net IIS 7.5 [英] How to Leverage browser caching at ASP.net IIS 7.5
问题描述
以下缓存资源有一个短暂的新鲜感寿命。指定至少一个星期在未来到期以下资源:
The following cacheable resources have a short freshness lifetime. Specify an expiry of at least one week in the future for the following resources:
http://pagespeed.googlelabs.com 建议我该为我的网站作为一个高优先级。我使用Windows Server 2008 R2的.net框架4.0 asp.net IIS 7.5。我该怎么做呢?
http://pagespeed.googlelabs.com suggest me this for my website as a high priority. I am using windows server 2008 r2 netframework 4.0 asp.net IIS 7.5 . How do i do this ?
这是直接的网址给你看:<一href=\"http://pagespeed.googlelabs.com/#url=www.monstermmorpg.com&mobile=false&rule=LeverageBrowserCaching\">http://pagespeed.googlelabs.com/#url=www.monstermmorpg.com&mobile=false&rule=LeverageBrowserCaching
This is the direct url for you to see : http://pagespeed.googlelabs.com/#url=www.monstermmorpg.com&mobile=false&rule=LeverageBrowserCaching
推荐答案
您可能会这篇文章,也是克里斯腾森的Mads写了一个<一个href=\"http://madskristensen.net/post/performance-tuning-tricks-for-aspnet-and-iis-7-part-1\">interesting <一href=\"http://madskristensen.net/post/performance-tuning-tricks-for-aspnet-and-iis-7-e28093-part-2\">blog帖子如何COM preSS,缩小并在您的网站的缓存动态和静态内容。
You might start here with this article, also Mads Kristensen had written an interesting blog post on how to compress, minify and cache dynamic and static content on your website.
<configuration>
<location path="showStockPrice.asp">
<system.webserver>
<caching>
<profiles>
<add varybyquerystring="*"location="Any"
duration="00:00:01" policy="CacheForTimePeriod"
extension=".asp">
</profiles>
</caching>
</system.webserver>
</location>
要缓存的静态内容
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/>
</staticContent>
这篇关于如何利用浏览器缓存在ASP.net IIS 7.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!