note 19605 added to ref.http
| From: | brian at remove-this dot keller-heikkila dot org | Date: | Tue, 05 Mar 2002 17:17:17 +0000 |
| Subject: | note 19605 added to ref.http | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27378@lists.php.net to get a copy of this message | ||
It is better to use this for automatic redirecting with no delay:
header("Location: http://some.server.com");
The reason it's better is because if you use a <meta http-equiv="redirect"...>
tag, the user will not be able to correctly use the browser's Back button. If they click the
Back button after a <meta> redirect, the browser will return them to the redirect page, where
they will be unwillingly redirected.
Using the header() function avoids this. If the user clicks the Back button when header() was used,
the browser will correctly take them back to the page *prior* to the redirect page, just as they
would want.
--
http://www.php.net/manual/en/ref.http.php
http://master.php.net/manage/user-notes.php?action=edit+19605
http://master.php.net/manage/user-notes.php?action=delete+19605
http://master.php.net/manage/user-notes.php?action=reject+19605