Monday, 26 November 2012

Disable back button via javascript

For disabling the back button functionality in the browser
Use this code on the master page

 <script type="text/javascript">
function noBack() {
window.history.forward()
}
noBack();
window.onload = noBack;
window.onpageshow = function (evt) { if (evt.persisted) noBack() }
window.onunload = function () { void (0) }
</script>

No comments:

Post a Comment