Jump to content

Creating a Countdown Timer


SandySynaptik

Recommended Posts

I have been creating a redirect page but now also want to include a timer to set a time of 3 secs. [or something]. It should be something like:

You will be redirected to example.php in "timer" secs.
How do I do so?
Link to comment
Share on other sites

I have been creating a redirect page but now also want to include a timer to set a time of 3 secs. [or something]. It should be something like:How do I do so?
if all you want to do is send somebody to your new page after 3 seconds, you can use a meta tag in the header. Here is a sample form one of my sites
<META HTTP-EQUIV=Refresh CONTENT="3; URL=http://besidethetrail.ca/directions.html">

Apparently this is not the best solution because it BREAKS the back button. But in the case of a permanent redirect I find it is a quick fix that allows you to say "adjust your bookmarks, we have moved."Guy

Link to comment
Share on other sites

Building on Guy's idea:Using JavaScript to change the window.location object should not break the back button. Since everyone does not enable JavaScript, one technique is to set the JavaScript mechanism to fire after, say, 3 seconds, and set the <meta refresh> tag to fire after 4 seconds. That way, most users will keep their backbutton functionality, and the refresh process will only affect those few who disable JavaScript.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...