Saturday, May 12, 2007

Redirect user to another pager after x seconds using Meta tag

In this blog you will learn how to redirect the users to another page/site after a number of seconds using meta tag.

Sometimes to be able to redirect your site visitors to another page automatically will come in handy, especially when you want to inform them that your site has been "moved" to a different URL so they can update their bookmarks.

To redirect the visitors to another page after a specified number of seconds, all you have to do is add the meta tag <META HTTP-EQUIV=" REFRESH" CONTENT="xxx; URL=newpage.htm"> to the header section of your page where xxx is the number of seconds to delay and newpage.htm is the URL of the page you want the visitors to go to.

Here's the code for it:


In this example, the browser will send the user to newpage.htm after 3 seconds.

No comments: