Skip to content

Instantly share code, notes, and snippets.

@dblotsky
Created April 10, 2018 03:26
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 dblotsky/bdf5cb9720c15aac7ace9c02235c03b7 to your computer and use it in GitHub Desktop.
Save dblotsky/bdf5cb9720c15aac7ace9c02235c03b7 to your computer and use it in GitHub Desktop.
Sample JS "Redirect"
<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- CSS goes in here -->
<style type="text/css">
</style>
</head>
<body>
<!-- your HTML goes in here -->
<!-- JS goes in here -->
<script type="text/javascript">
var WAIT_IN_MILLISECONDS = 3000;
// define the function that will get called after the timeout
function redirectToPlace() {
window.location = 'http://tchebotarev.com';
}
// schedule the function to get called after the timeout
setTimeout(redirectToPlace, WAIT_IN_MILLISECONDS);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment