Re: IE & $HTTP_REFERER...
| From: | Erik Price | Date: | Thu, 11 Apr 2002 17:23:22 +0000 |
| Subject: | Re: IE & $HTTP_REFERER... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92617@lists.php.net to get a copy of this message | ||
On Thursday, April 11, 2002, at 11:49 AM, Matthew Walker wrote:
I just ran across a very strange problem with IE. When I use javascript to open a new window (Using window.open()), the page that is loaded in the new window does not get any HTTP_REFERER. Does anyone know why this is, and if other browsers will have the same problem? I use Mozilla, and it passes the referrer properly.Well, from what I understand you're not guaranteed to have access to the HTTP_REFERER (depends on the browser/user agent), so relying on it isn't a good idea (as your example demonstrates). I have gotten around this by using $_SERVER['QUERYSTRING'], and loading this into a hidden form field, or you can write a function that takes this value and transforms it into ASCII and then urlencode() the ASCII code to put it into a link, or you could pass it as an argument to your JavaScript function, or what have you. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com