title: Where to set no-cache header - in pageload or page init (in .net)
body: <p>I have web page that uses no-cache mechanism for not to let browser to cache content. However, I have some doubts. The developer has inserted no cache code into the PageLoad method in MasterPage.</p>
  
  <p>It is like this (<strong>on Page Load in Master Page</strong>)</p>
  
  <pre><code>   HttpContext.Current.Response.CacheControl = "no-cache"
     HttpContext.Current.Response.AddHeader("Pragma", "no-cache")
     HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.Date
     HttpContext.Current.Response.Expires = -1
  </code></pre>
  
  <p>I have some doubt that this is the correct action and whether this could should be better inserted into <code>BasePage OnInit</code> event?</p>