How to cache static content in asp.net webforms?

Facebooktwittergoogle_pluslinkedinmail

you can enable cache easily by web.config in asp.net.
put this code inside web.config in the root folder of project. This works perfectly with IIS7.

<configuration>

<system.webServer>
<staticContent>

<clientCache cacheControlMode=”UseMaxAge” cacheControlMaxAge=”365.00:00:00″ />
</staticContent>
</system.webServer>
</configuration>

This will improve performance of your website and decrease loading time.

Facebooktwittergoogle_pluslinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *