title: How to disable back,forward and Refresh functionality in browser?
body: <p>Can anyone help me to disable browser back,forward, back button and right click menu functionality using JavaScript or JQuery? I have tried disabling the back button like this:</p>
  
  <pre><code>function disableBackButton() {
       window.history.forward();
  }
  setTimeout("disableBackButton()", 0);
  </code></pre>
  
  <p>I have called this function in the Body <code>onload</code> event. I have a doubt that where we need to put this code in the Calling page or Called Page.Suppose i have two pages like this <code>FirstPage.aspx</code> and <code>SecondPage.aspx</code>. When I navigate from the First Page to Second Page when I click back button of the browser it should not go to <code>FirstPage.aspx</code>.</p>