Skip to content

Instantly share code, notes, and snippets.

@cwylie0
Last active July 21, 2016 14:21
Show Gist options
  • Save cwylie0/16563af76e2cfcfee58966f335acb280 to your computer and use it in GitHub Desktop.
Save cwylie0/16563af76e2cfcfee58966f335acb280 to your computer and use it in GitHub Desktop.
Page redirect using JavaScript
// 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