I would like to Disable Back button when user click on logoff for this i delete only cookies of that user not session in my application. And want to disable Back button
CODE:
<HTML>
<HEAD>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() {
window.history.forward();
}
</SCRIPT>
</HEAD>
<BODY onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload="">
</BODY>
</HTML>
var path = 'Test.aspx'; //write here name of your page
history.pushState(null, null, path + window.location.search);
window.addEventListener('popstate', function (event) {
history.pushState(null, null, path + window.location.search);
});
This works across all browsers(except < IE10) even if urls have query strings appended.
For this you don't even need jquery.
have a look here to apply this for your page.