Noodle wrote:
Hi All,
I know that document.referrer can be used to get the last page the user
visited,
You might think that gives you the last page visited, but it is very
unreliable.
If whatever UA I am using decides to give you a referrer, it might be
the page that linked to your site or it could be whatever I told the UA
to send you. If I have copied the link and pasted it, you'll get no
referrer at all.
but how can I get the page visited before that? Can this be
done in JS?
No. You can't access the browser history, all you can do is attempt to
send the user backward or forward some count of links based on the
history of the window or tab that the page has been opened in - which
might not be the window that was used to navigate to the page.
--
Rob