Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic redirection after a few seconds

Status
Not open for further replies.

markknowsley

Programmer
Aug 30, 2005
152
GB
Can someone post some code / link to tutorial on how to automatically redirect a web page after a few seconds once it has loaded?

Thanks in advance.

Mark.
 
<meta http-equiv="refresh" content="5;url=http://www.tek-tips.com">

Where 5 is to be replaced by your number of seconds before redirect and obviously is to be replaced with your redirect url.

You can also write a javascript piece that does a little count and then does a document.location change, but that would be ineffective if someone had javascript turned off.

----------------------------------------

TWljcm8kb2Z0J3MgIzEgRmFuIQ==
 
Additionally, if you wanted to do it from within a C# codebehind on an ASP.net page, you would do this

Code:
Response.AddHeader ("Refresh", "5; URL=http://www.tek-tips.com");

----------------------------------------

TWljcm8kb2Z0J3MgIzEgRmFuIQ==
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top