Forum Moderators: open
I have a page with navigation to another page either via either
a clickable href link
or..
a script which reads the keyboard, looking for a specific key sequence
The script does this via document.location("whatever").
Navigation works fine in both cases, but in the target page I need to find where the browser has come from. $_SERVER['HTTP_REFERER'] is set when arriving via the clickable link, but is blank when arriving via the script.
This looks to be browser behaviour. Is there any way to get the referrer in the latter case using the REFERER header mechanism (yes, I know it's not completely reliable cross-browser!)?
Thanks,
Chris
My best guess is that Javascript doesn't allow this because of possible cross-domain or cross-page security issues.
Anyway I've worked out how to get the same effect using cookies.
Chris