Created
September 27, 2013 23:55
-
-
Save orenmizr/6736828 to your computer and use it in GitHub Desktop.
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
// use this to avoid redirects when a user clicks "back" in their browser | |
window.location.replace('http://somewhereelse.com'); | |
// use this to redirect, a back button call will trigger the redirection again | |
window.location.href = "http://somewhereelse.com"; | |
// given for completeness, essentially an alias to window.location.href | |
window.location = "http://somewhereelse.com"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment