how to stop browser back button using javascript/jquery? Tamil Programmers

#behindthecode SAMPLE 1 <script> $(document).ready(function() { window.history.pushState(null, "", window.location.href); window.onpopstate = function() { window.history.pushState(null, "", window.location.href); }; }); </script> SAMPLE 2 <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> by Tamil Programmers