• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 754
  • Last Modified:

how to make a page aut redirect after 5 seconds

Hi every one . Probably an easy question here. I need to have a page auto redirect to another url after 5 secodns what is the script for that
Thaks Shayne
0
shayne23d
Asked:
shayne23d
2 Solutions
 
kingsfan76Commented:
here's a simple sample:

<html>
<p>
This page will redirect in 5 seconds.
</p>
<script>
self.setTimeout("window.location='http://www.google.com'", 5000);
</script>
</html>
0
 
Saqib KhanSenior DeveloperCommented:
<body onLoad="setTimeout('window.location=\'http://www.yahoo.com\'', 5000)">
0
 
frrfCommented:
<head>
<META HTTP-EQUIV=Refresh CONTENT="5; URL=http://www.htmlhelp.com/">
</head>
0
 
nurbekCommented:
i think frrf's solution is better

because, in others javascript maybe disabled on the browser:)
0
 
Vinod_VijayanVinCommented:

i don't want to be rude here
but i want to mention that META refresh can also be disabled from the security settings of IE.
I don't know of other browsers.
 
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now