By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,313 Members | 2,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,313 IT Pros & Developers. It's quick & easy.

How to get users browsing history

P: n/a
Hi All,

I know that document.referrer can be used to get the last page the user
visited, but how can I get the page visited before that? Can this be
done in JS?

TIA

Sep 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

Sep 11 '06 #2

P: n/a
"Noodle" <ne*****@gmail.comwrote in news:1157963041.166520.137330
@i3g2000cwc.googlegroups.com:
Hi All,

I know that document.referrer can be used to get the last page the user
visited, but how can I get the page visited before that? Can this be
done in JS?
come on, you don't really want someone knowing the banking sites and porn
sites you visited before hitting their magical javascripted page, do you?
Sep 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.