Is it possible to catch "History.Back" event in JavaScript? İ want to catch history.back() event and logout user.

P.s : There is some code about disabling history.back(), but is not useful for me.

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

then set onunload event

<body onunload="disableBackButton()">
Edit
Report