3
Reply

Disable browser cache for entire ASP.NET website?

Ritesh Singh

Ritesh Singh

Aug 19, 2016
1.5k
1

    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.

    Ritesh Singh
    August 19, 2016
    1

    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.

    Suresh Kumar
    November 10, 2017
    0

    By setting in browser

    Mukesh Kumar
    September 02, 2017
    0