Re: Redirects in PHP

From: Date: Fri, 13 Jun 2003 17:46:52 +0000
Subject: Re: Redirects in PHP
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-151389@lists.php.net to get a copy of this message
At 19:00 13.06.2003, Zak Johnson said: --------------------[snip]-------------------- >This will not solve the OP's problem; the header will still be output >first, and the client will be immediately redirected. I am curious >though; why is everyone suggesting to use JavaScript when the following >in the <head> section of the HTML document will work just as well? > > <meta http-equiv="refresh" > content="3;URL=http://example.com/new-page.html" > /> > >Am I missing something? --------------------[snip]-------------------- This will (or should...) always work regardless of JS settings. Being a HTTP equivalent this also means you can transmit it as MIME header as well: header('Refresh: 5;URL="http://www.microsoft.com"'); echo 'Transferring you to Microsoft in 5 seconds...'; exit; HTH, -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#151389) next »