Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 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 ?

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

like image 552
MonsterMMORPG Avatar asked Jul 09 '11 10:07

MonsterMMORPG


1 Answers

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>
like image 53
Nikita Ignatov Avatar answered Sep 19 '22 05:09

Nikita Ignatov