开发者

How to Leverage browser caching at ASP.net IIS 7.5

开发者 https://www.devze.com 2023-03-18 21:34 出处:网络
The following cacheable resources have a short freshness lifetime. Specify an expiry of at least one week in the future for the following resources:

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 suggest me this for my website as a high priority. I am using windows server 2008 r2 netframework 4.0 asp.net II开发者_JS百科S 7.5 . How do i do this ?

This is the direct url for you to see : http://pagespeed.googlelabs.com/#url=www.monstermmorpg.com&mobile=false&rule=LeverageBrowserCaching


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>

To cache static content

<staticContent>
 <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/>
</staticContent>
0

精彩评论

暂无评论...
验证码 换一张
取 消