Pushpinder Singh Garcha <mailto:[EMAIL PROTECTED]>
    on Thursday, July 24, 2003 11:10 AM said:

> hello everyone,
> 
> Can somebody tell me why meta-refresh is not preferred to do
> re-directs ?

I think because it breaks the back button (explained in more detail
later).

> using headers in php requires that no output is sent to the browser,
> what if the code logic requires that there is some output sent to the
> browser. I am sorry if this is a repeat question because someone
> earlier did mention abt output buffering as a way around.

Well, if you use a header("Location: ..."); redirect there's no point in
sending anything to the browser because no one is going to see it.

If some output is required to be seen by the user you should just put a
link to the next page and not worry about a redirect at all.

OOORRRR, at the very least, give the meta-refresh a time of about 5
seconds or more so that the back button is not broken. I think the
problem with meta-refresh is that if you try to do an instant refresh
(like the way header(); works) you'll prevent the user from being able
to click the back button since every time they try to go back and reload
the previous page (in their mind they are wanting to go back to the page
BEFORE the redirect page) it will immediately send them back to the page
they were just on because they hit the redirect page first.


hth,
chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to