Hello there,

Is there any way of disabling caching of asp.net pages in folder or application level.... meant to say, is there any option available in the web.config file for disabling caching...i have done by using page wise...but need to disable caching for all pages in my application...

plz help me on how to disable caching for all asp.net pages at a time...

thanks for any help provided.

regards
shouvik

Recommended Answers

All 5 Replies

Response.Buffer=<SPAN style="COLOR: blue">true;<o:p></o:p>
Response.ExpiresAbsolute=DateTime.Now.AddDays(-1d);
Response.Expires =-1500;
Response.CacheControl = "no-cache";
Response.Buffer=<SPAN style="COLOR: blue">true;<o:p></o:p>
Response.ExpiresAbsolute=DateTime.Now.AddDays(-1d);
Response.Expires =-1500;
Response.CacheControl = "no-cache";

thanks for your quick reply...i know these...what i want is to disable caching in folder or application level...like using any settings in the web.config file or global.asax.file....somewhere i read this can be done using global.asax file but dnt know how to implement that....please help in this regards only.....

thnks once again...

I am not sure if there is way of disable caching using web.config file as this setting is more browser oriented.

I understand you want to just disable caching eveywhere by changing at one place. You can create a parent page and put the above code in the same and all the pages inherit from the same.

> is there any option available in the web.config file for disabling caching

Configure the OutputCacheSection. It is used to configure app-scope settings. Have a look at MSDN article - Cache Configuration in ASP.NET

> is there any option available in the web.config file for disabling caching

Configure the OutputCacheSection. It is used to configure app-scope settings. Have a look at MSDN article - Cache Configuration in ASP.NET

thnks for the link....though i have visited it earlier before posting the question but not found anything that can work for me....but now i have found something regarding outputcache section in the msdn article.....will try that thing out and will reply here as soon as i get any result...

in the mean time, thnks for all the info.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.