title: Disable browsers' back button, completely
body: <p>Need to prevent users going to the previous page, completely.</p>
  
  <p>When I use the following code it works but it's not what I need exactly. When pressing the back button it says "Document Expired":</p>
  
  <pre><code>Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));
  Response.Cache.SetValidUntilExpires(false);
  Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
  Response.Cache.SetCacheability(HttpCacheability.NoCache);
  Response.Cache.SetNoStore();
  </code></pre>
  
  <p>Another idea - to open a new window without toolbar:</p>
  
  <pre><code>&lt;script&gt;
      function PopupWithoutToolbar(link) {
          var w = window.open(link.href,
              link.target || "_blank",
              'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,dependent,width=800,height=620,left=0,top=0');
          return w ? false : true;
      }
  &lt;/script&gt;
  
  &lt;a href="http://www.google.com" onclick="return PopupWithoutToolbar(this)"&gt;yahoo&lt;/a&gt;
  </code></pre>
  
  <p>But, still... If the user presses the backspace button on a keyboard he can go back. It seems that this approach is only for hiding and not disabling buttons.</p>
  
  <p><strong>Is there any way to simply ignore the back button?</strong></p>