Disable browser cache for entire ASP.NET website?
Ritesh Singh
Web page must be requested fresh or new each time from the server. On Page Load event write below code:- Response.Cache.SetNoStore(); Response.AppendHeader("Pragma","no-cache");Response.Expires = 0; So whenever the Page_Load event occurs, it will ask a new copy from server, so that we can write code which will check that whether the request is valid or not.
You can configure page output caching in these places: Configuration files You can configure page output cache settings in any configuration file in the application configuration hierarchy, including the Machine.config file (to make settings for all Web applications on the computer) and your application-specific Web.config file (to make settings for a single application). Individual pages You can set caching options in individual pages either declaratively or programmatically. You can also apply cache profiles created in the configuration file to individual pages. User controls You can set caching in individual user controls either declaratively or programmatically. This is an easy way to cache content within a page that is otherwise not cached.
By setting in browser