Skip to content

Instantly share code, notes, and snippets.

@ethyde
Created September 30, 2014 11:08
Show Gist options
  • Save ethyde/0e9d336c0d5ed8d33fd8 to your computer and use it in GitHub Desktop.
Save ethyde/0e9d336c0d5ed8d33fd8 to your computer and use it in GitHub Desktop.
Redirect page source : http://stackoverflow.com/a/506004
// 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