Ritesh Singh
Disable browser cache for entire ASP.NET website?
By Ritesh Singh in ASP.NET on Aug 19 2016
  • Ritesh Singh
    Aug, 2016 19

    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.

    • 1
  • Suresh Kumar
    Nov, 2017 10

    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.

    • 0
  • Mukesh Kumar
    Sep, 2017 2

    By setting in browser

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS