javascript - Change the back button URL in browser -


i want disallow visitor go in browser, tried code here (how disable button in browser using javascript) , works well, want make somenthing more useful application. want change url.

so, if url mywebsite.com/admin/add_new_article.php want change url mywebsite.com/admin/index.php

thank all!

<script type="text/javascript"> history.pushstate(null, null, '<?php echo $_server["request_uri"]; ?>'); window.addeventlistener('popstate', function(event) {     window.location.assign("http://www.yoururl.com/"); }); </script> 

hope helps!


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -