Page 1 of 1

redirection to a new url after headers have been passed.

Posted: Fri Oct 28, 2005 5:06 pm
by siddahuja
Hi

I am trying to find a method to redirect to a new url once the headers have already been passed.

Please advise.
thanks
sid

Posted: Fri Oct 28, 2005 5:10 pm
by Burrito
meta refresh or javascript location method

Posted: Fri Oct 28, 2005 7:16 pm
by Luke

Code: Select all

<script language="javascript">
location.replace("http://www.whatever.com")
    </script>
Or if you want a time delay:

Code: Select all

<script language="javascript">
    setTimeout("location.replace(sTargetURL)",  time_in_milliseconds)
    </script>
to get milliseconds just multiply the amount of seconds times 1000