Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

Can anybody help me to add caching on my css and js files that will expire after 1 week. (asp.net)

The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:

for CSS and JS File:

Thanks...

What I have tried:

i am still search it but didn't get any suitable answer yet.
Posted
Updated 26-Jul-17 2:22am

1 solution

Found within 2 seconds on Google..

Configure IIS 7 Output Caching | Microsoft Docs[^]
 
Share this answer
 
Comments
HarryMadaan 27-Jul-17 9:06am    
I don't have access of IIS, I want to set it all using asp.net code. Please suggest via code. How to add caching on my css and js files that will expire after 1 week.
[no name] 27-Jul-17 14:35pm    
Please read the article, it explains how to configure it in your Web.config file.

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