window.location = "http://www.google.com/"
- Showing an "Update your bookmark" page when you have to change URLs or page locations
- For download sites that wish to have a timed delay before the download starts
- To refresh a webpage once every specified number of seconds
The code for this timed delay is slightly involved and is beyond the scope of
this tutorial. However, we have tested it and it seems to function properly.
<body onLoad="setTimeout('delayer()', 5000)">
<h2>Prepare to be redirected!</h2>
<p>This page is a time delay redirect, please update your bookmarks to our new
- 'delayer()' - The function we want setTimeout() to execute after the specified delay.
- 5000 - the number of millisecods we want setTimeout() to wait before executing our function. 1000 miliseconds = 1 second.
Web Page Redirection
Found Something Wrong in this Lesson?
Report a Bug or Comment on This Lesson - Your input is what keeps Tizag improving with time!