title: Clear browser history
body: <p>I wrote the following code to clear the browser history and it's working correctly in Internet Explorer but it does not work in Mozilla Firefox. How can I solve this problem?</p>
  
  <pre><code>&lt;script language="JavaScript"&gt;
  function DisablingBackFunctionality()
  {
      var URL;
      var i ;
      var QryStrValue;
      URL=window.location.href ;
      i=URL.indexOf("?");
      QryStrValue=URL.substring(i+1);
      if (QryStrValue!='X')
      {
          window.location.href="http://localhost:8085/FruitShop/";
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm writing this code in <code>&lt;header&gt;</code> section. </p>