SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Jul 24, 2001, 17:51 #1
- Join Date
- Jan 2001
- Location
- Ottawa ON
- Posts
- 315
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Javascript Document history - Is it possible to know the previously viewed document?
This is a followup to http://sitepointforums.com/showthrea...&postid=206001 where I learned that the PHP variable $HTTP_REFERER didn't function in the manner that I anticipated.
This is what I would like to do with Javascript:
Determine what the previous page was that the user was viewing, even if the user arrived at my site by through the use of a browser function (history, location bar, refresh, etc.). Is this possible?
I'm not wuite sure how document.history functions - what degree of privacy is given to the user and to what extent can web pages get URLs from the user's history?
-
Jul 24, 2001, 18:01 #2
- Join Date
- Oct 2000
- Location
- Austin, TX
- Posts
- 1,438
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The only thing you can read is document.referrer. The history object can only be used to send the user forward or backward: history.go(), history.back(), history.forward(); you can't access the actual urls.
-
Jul 24, 2001, 22:08 #3
- Join Date
- Jan 2001
- Location
- Ottawa ON
- Posts
- 315
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks. I'll use a different method of accomplishing the same task that I originally attempted.
Bookmarks