Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How can i cache .css , png and js file in mvc application.

regards
Hyma
Posted
Updated 17-Aug-15 21:13pm
v2

1 solution

Check below links may be it help:
Image Caching in ASP.NET
Static Content Caching ASP.NET

Also use i Web.Config
XML
<configuration>
  <system.webserver>
    <staticcontent>
      <clientcache cachecontrolmode="UseMaxAge" cachecontrolmaxage="365.00:00:00" />
    </staticcontent>
  </system.webserver>
</configuration>

The above code tells the browsers to automatically cache all static resources for 365 days.

Hope It Helps :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900