window.history.forward(); function preventBack() { window.history.forward(1); }we can call preventBack() function on page load
<html><head> <title>Disable Browser Back Button Using JavaScript</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"> </script></head><body> <a href="Page2.htm">Click Here...</a></body><script> $(document).ready(function() { function disableBack() { window.history.forward() } window.onload = disableBack(); window.onpageshow = function(evt) { if (evt.persisted) disableBack() } });</script></html>
<html>
<head>
<title>Disable Browser Back Button Using JavaScript</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js">
</script>
</head>
<body>
<a href="Page2.htm">Click Here...</a>
</body>
<script>
$(document).ready(function() {
function disableBack() { window.history.forward() }
window.onload = disableBack();
window.onpageshow = function(evt) { if (evt.persisted) disableBack() }
});
</html>
please try this http://www.htmlgoodies.com/tutorials/buttons/article.php/3478911/Disabling-the-Back-Button.htm