Created
April 28, 2021 17:13
-
-
Save fhdalikhan/6e0b02606ea6030099b728ffeccd46df to your computer and use it in GitHub Desktop.
change browser's back button url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
history.pushState(null, null, '<?php echo $_SERVER["REQUEST_URI"]; ?>'); | |
window.addEventListener('popstate', function(event) { | |
window.location.assign("http://www.yoururl.com/"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment