Friday, 14 November 2008

$_SERVER['HTTP_REFERER'] and firefox

Just a quick note on a potentially useful discovery - if you need to keep track of the http referer and you're counting on using javascript (e.g. you might be writing an AJAX service), firefox doesn't pass the http_referer to a service when it gets (or posts) to it.

So if you were writing a service (say: something like a login overlay that returns the user to the last page they were viewing), you can 'resolve' the http referer from the javascript window.location.href. Useful to know, I think :)

No comments: