Re: HTTP_REFERER with javascript: document.location

From: Date: Tue, 18 Apr 2006 21:16:45 +0000
Subject: Re: HTTP_REFERER with javascript: document.location
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-234214@lists.php.net to get a copy of this message
On Tue, April 18, 2006 12:49 pm, Yudie wrote: > Does anyone know how to resolve my problem > I tried to get the referer url with $_SERVER['HTTP_REFERER'] but > returns > blank when I use javascript: document.location='...' from the previous > page. Don't do that. :-) More specifically, no browser is required to provide HTTP_REFERER, so that value is completely un-reliable. If, for some reason, your application NEEDS the preceding page, you'll need to track it in the URL, or in their session, or through some mechanism that YOU control. Rule #1: Never, ever, ever, trust the browser. Or the guy/gal/bot using it, for that matter. Hope that helps, even if it's *so* not what you wanted to hear. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#234214) next »