anybody99 Posted March 18, 2007 Share Posted March 18, 2007 hey, what is the best way known and also faster to redirect from htm/html page to other page, instantly. thanks! Quote Link to comment https://forums.phpfreaks.com/topic/43281-what-is-the-best-way-to-redirect-to-other-page/ Share on other sites More sharing options...
Mutley Posted March 18, 2007 Share Posted March 18, 2007 I use: <script type="text/javascript"> window.location = "page.html" </script> Quote Link to comment https://forums.phpfreaks.com/topic/43281-what-is-the-best-way-to-redirect-to-other-page/#findComment-210156 Share on other sites More sharing options...
per1os Posted March 18, 2007 Share Posted March 18, 2007 header("Location: http://www.site.com/newpage.html"); Quote Link to comment https://forums.phpfreaks.com/topic/43281-what-is-the-best-way-to-redirect-to-other-page/#findComment-210171 Share on other sites More sharing options...
shaunrigby Posted March 18, 2007 Share Posted March 18, 2007 Meta refresh - google it Quote Link to comment https://forums.phpfreaks.com/topic/43281-what-is-the-best-way-to-redirect-to-other-page/#findComment-210223 Share on other sites More sharing options...
anybody99 Posted March 19, 2007 Author Share Posted March 19, 2007 the best thing is the java one...meta refresh can be very slow sometime. Quote Link to comment https://forums.phpfreaks.com/topic/43281-what-is-the-best-way-to-redirect-to-other-page/#findComment-210282 Share on other sites More sharing options...
cmgmyr Posted March 19, 2007 Share Posted March 19, 2007 unless they have javascript disabled... Quote Link to comment https://forums.phpfreaks.com/topic/43281-what-is-the-best-way-to-redirect-to-other-page/#findComment-210287 Share on other sites More sharing options...
drewbee Posted March 19, 2007 Share Posted March 19, 2007 Yeah... I always do it like this... <script type="javascript"> location.href = '/wherever.html'; </script> <noscript> <meta name="refresh" content="0;url=/wherever.html" /> </noscript> That way it defaults to javascript, but if they have it disabled it will use the meta Quote Link to comment https://forums.phpfreaks.com/topic/43281-what-is-the-best-way-to-redirect-to-other-page/#findComment-210299 Share on other sites More sharing options...
JayLewis Posted March 19, 2007 Share Posted March 19, 2007 <meta http-equiv="refresh" content="2;url=http://yoursite.com"> Order the tag to refresh http-equiv="refresh" This specifies the time... so in this case, it will redirect in 2 seconds. content="2 The destination of the redirection. url=http://yoursite.com"> I hope this helped Quote Link to comment https://forums.phpfreaks.com/topic/43281-what-is-the-best-way-to-redirect-to-other-page/#findComment-210302 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.