Created
October 10, 2016 09:55
-
-
Save lmeyer/b98bdda9237e43179019c84c9de20771 to your computer and use it in GitHub Desktop.
Javascript page redirection difference
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
// similar behavior as an HTTP redirect | |
window.location.replace("http://stackoverflow.com"); | |
// similar behavior as clicking on a link | |
window.location.href = "http://stackoverflow.com"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment