Disable back button

Category > JAVASCRIPT || Published on : Wednesday, June 17, 2015 || Views: 4247 || disable the back button and rewrite the Url


 <script type="text/javascript">
       
        history.pushState(null, null, 'Action');
        window.addEventListener('popstate', function (event) {
            history.pushState(null, null, 'Action');
        });

    </script>