Re: A faster way to Redirect pages

From: Date: Mon, 17 Mar 2003 17:35:58 +0000
Subject: Re: A faster way to Redirect pages
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139986@lists.php.net to get a copy of this message
Poon, Kelvin (Infomart) wrote:
I know this topic was discussed but I deleted my previous mail so I can't go back and review them.
STFA: http://marc.theaimsgroup.com/?l=php-general
My question is, is there a faster way to redirect html pages other than just using <meta HTTP-EQUIV="REFRESH" CONTENT="1; URL=login.php"> ? Is there any way we can do that in php so that it redirect "FASTER"? Right now I set the redirect time to be 1 sec, but for some reason it still takes kind of long until it actually redirects, I was wondering if there is any other way I can do this faster.
Yes, check out the "header" function. You will pass it a string argument: $my_url = "http://php.net/header"; // your URL goeth here header("Location: $my_url"); Note that you have to call header /before/ you send output to the browser. Erik

« previous php.general (#139986) next »