Public · Protected · Private
Disable caching of a resource
Type: Public  |  Created: 2012-10-05  |  Frozen: Yes
« Previous Public Blog Next Public Blog »
Comments
  • 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>

    2012-10-05 06:59
  • 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" %>

    2012-10-05 08:19
This blog is frozen. No new comments or edits allowed.