Visual Studio .NET - How to disable cache in Asp.Net ?

Asked By Nagaraj muthuchamy on 13-May-08 10:24 AM


I have doubt in Browser cache in Asp.Net.

I have a website with search box, Now i want to disable to cache for search results page.

For ex: I am opening the homepage and search for some Key, It takes me to search result page,I try search for some more words in that page. When i click on the Back Button in browser , It brings the last results page, after making some some more clicks in back button, It takes me to actual page where i came from. Try with (

Is there anyway to bring the Non-Search Result Page while clicking browser back button from the Search Results Page.



Disable Output Cache for an individual page / entire application - Rakesh Vikram replied to Nagaraj muthuchamy on 13-May-08 10:50 AM

There are various soutions for disabling cache. 


<%@ OutputCache Duration="0" VaryByParam="none" %>


This one line, at the top of your aspx page or in your page_load event handler, prevents the web page from being saved in the client cache.


Also refer this link for more information:


For more information refer the below articles:


Hope this helps in finding a solution. All the Best!!

Rakesh Vikram

See This - SP replied to Nagaraj muthuchamy on 14-May-08 01:14 AM

See the following artiele, it may help you...