I'm currently running a direct from a html page via meta-equiv=refresh but I've noticed it's a little slow. Is there a better and faster way to redirect? Thanks
you can try this :
header("Location : your_page.html");
but this header must be placed before any tag which sends something to the browser, even before a cookie set action ...
hth
see ya
You could use java script maybe it will work better try this: echo "<SCRIPT>window.location.href='index.php'</SCRIPT>";
Originally posted by ovisopa you can try this : header("Location : your_page.html"); [/B]
Originally posted by ovisopa you can try this :
[/B]
i like to put an -
exit;
after the header as i've been caught out by the php continuing to process after the header instruction 🙂
tony
Uh...nothing's working. I'm trying to call all locations from a single file (gallery.js) thru various html or php pages.
gallery.js function heartlily() { document.write('<window.location.href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&category=20144&item=3711489129">'); }
heartlily.html <html> <head> <title>HEART OF THE LILY</title> <script src="gallery.js"></script> <script>heartlily();</script> </head> </html>
Originally posted by gersh You could use java script maybe it will work better try this: echo "<SCRIPT>window.location.href='index.php'</SCRIPT>";
All that certainly wouldn't be any faster - in fact it would probably be a wee bit slower. Unless something weird has not been explained, [man]header[/man] would be more appropriate.
I emptied my cache and it did seem that header was quicker to redirect. Thanks all. 😃