Thursday, May 31, 2012

Using JavaScript, we can forward the user to the same page if user presses the back button of the browser. See the code below :

 <script type="text/javascript" language="javascript">
    
    function GoBack()
    {
        window.history.forward();
    }
    </script>
 
 
Call this JavaScript function on the onload event of body tag.
 
<body onload="GoBack();">