0

I want to disable the browser's back button after log out.

I have already set session ["session-id"] to null on log out event.

But when I am pressing back button of the browser :

It will redirect me to that secure page from which I've already log out.

Please Give me any solution about this problem

Jad Chahine
  • 6,849
  • 8
  • 37
  • 59
  • 2
    maybe this can help you http://stackoverflow.com/questions/21930487/how-to-prevent-browser-back-button-after-logout – Robert Sep 23 '15 at 08:37

1 Answers1

3

The below Javascript code may help you...

<script type = "text/javascript" > 
    function preventBack(){window.history.forward();} 
    setTimeout("preventBack()", 0); 
    window.onunload=function(){null}; 
    </script>

use the code in a page where you don't want to go back...

Sankar
  • 6,908
  • 2
  • 30
  • 53