Skip to content

Instantly share code, notes, and snippets.

@AlphaBlossom
Last active May 21, 2020 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlphaBlossom/826fe6010229ade5a50c42375949b005 to your computer and use it in GitHub Desktop.
Save AlphaBlossom/826fe6010229ade5a50c42375949b005 to your computer and use it in GitHub Desktop.
JS HTTP Redirect
<script>
// Redirect website to new URL Right Away
window.location.replace("https://google.com");
// Redirect website to new URL after 5 seconds
window.setTimeout(function(){
window.location.href = "https://www.google.com";
}, 5000);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment