jeudi 23 avril 2015

How to disable the browser back button with java script, ruby on rails

How to disable the browser back button while navigating in our application. I already try with the following code it prevent only go back option not hide or disable the back navigation icon.

<script type = "text/javascript" >
      history.pushState(null,null);
      window.addEventListener('popstate', function() {
          history.pushState(null,null); });
</script>

And

<script type="text/javascript">

  window.history.forward();

</script>

I want to know atleast able to mask that browser back navigation icon/button( like open new tap in browser that navigation bar display mask mode)

Aucun commentaire:

Enregistrer un commentaire