Re: Fussy logic...
| From: | Renze Munnik | Date: | Thu, 16 Aug 2001 08:26:12 +0000 |
| Subject: | Re: Fussy logic... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62995@lists.php.net to get a copy of this message | ||
On Thu, Aug 16, 2001 at 10:01:36AM +0200, Tribun wrote:
> Moin!
>
> Has anybody already thought about the problematic conditional on adding an
> automatic "BACK" Link?
>
> It seems to be very easy... just Link to basename($HTTP_REFERER);
>
> BUT if you CLICK on this Link, and come to a prior site, the BACK-Link THERE
> appears NOT to the PAGE, witch was prior this, but is linked to the Site you
> come from...
> so the link should better be called "FORWARD".
>
> Do U C the problem???
>
> ;)
>
> Has someone an idea to solve it?
>
>
> Sincerely yours,
> Patrick Lehnen (alias: Tribun)
Patrick,
It's pretty obvious that after using it once it becomes a forward
link because the HTTP_REFERER is the page you last came from. And
after using the back-button once, the last page was the 'next'. The
HTTP_REFERER isn't some kind of history-list.
If you realy want to go Back, why not use:
JS: history.back(...);
That way you really use the history-list of the browser. So after
using it once, it's still a Back-button instead of a Forward-button.
Besides that, using the $HTTP_REFERER isn't really something to rely
on. $HTTP_REFERER doesn't always have to be set. In that case you
can't go either Back nor Forward.
--
* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: renze@datalink.nl
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM HAARLEM
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««