title: How to identify if I pressed the back button in IE?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6359327/detect-back-button-click-in-browser">detect back button click in browser</a>  </p>
  </blockquote>
  
  
  
  <p>I have two pages, Page1 and Page2. When moving from Page1 to Page2 by clicking a link, I tend to store the conditions required to restore the state of Page1 on clicking browser back button when on Page2.</p>
  
  <p>I am using the below function to clear the cache,</p>
  
  <pre><code>protected override void OnInit(EventArgs e)
  {
      Response.Cache.SetCacheability(HttpCacheability.NoCache);
      Response.Cache.SetNoStore();
      Response.Cache.SetExpires(DateTime.MinValue);
      base.OnInit(e);
  }
  </code></pre>
  
  <p>so that I can reload the page based on stored conditions in the cookie. But the issue is how to identify if I have pressed the browser back button or the menu link to come to Page1.</p>
  
  <p><strong><em>Update:</em></strong></p>
  
  <p>i just landed on this link <a href="https://stackoverflow.com/questions/6359327/detect-back-button-click-in-browser">detect back button click in browser</a> but it doesn't work for me</p>