Disable caching of a resource

use following HTTP header for particular page:

Cache-Control: no-cache

OR

Response.AppendHeader("Cache-Control", "no-store");

 

Setting in web.config

<configuration>
  . . .
  <location path="image.jpg">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlMode="DisableCache" />
      </staticContent>
    </system.webServer>
  </location>
</configuration>

Cache Profiling

<system.web>


<caching>


<outputCacheSettings>


<outputCacheProfiles>

<add name="CacheAweek" duration="604800"
location="Client" varyByParam="none" />

</outputCacheProfiles>


</outputCacheSettings>

</caching>

</system.web>


To use this profile, refer it as :

<%@ OutputCache CacheProfile="CacheAweek" %>