0
Answer

Client Cache Not Working for StaticContent

Smart    Lucky

Smart Lucky

10y
825
1
Hi dudes
 
I am i have an mvc application (with NHibernate) i want to enable client cache for static contents using web config but it is not working , blow code i have wrote , can any one help please
 
 
 
 
 
<location path="Content/css">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
</staticContent>
</system.webServer>
</location>
<location path="Scripts">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
</staticContent>
</system.webServer>
</location>
<location path="images">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
</staticContent>
</system.webServer>
</location>