Last active
October 2, 2015 04:17
-
-
Save ecabuk/2170162 to your computer and use it in GitHub Desktop.
JavaScript Page Redirect
This file contains hidden or 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"; | |
//http://stackoverflow.com/a/506004/629760 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment