SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: referrer's url
-
Mar 16, 2001, 08:25 #1
- Join Date
- Feb 2001
- Location
- Dùn Éideann, Alba
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi, while i know how to get the domain of the referrer (i.e. document.referrer), I don't know how to get the entire URL of the referrer.
Does any1 have an idea as to how this might be done?
Cheers. Scot-bot.
-
Mar 16, 2001, 11:48 #2
- Join Date
- Feb 2001
- Location
- Van down by the river
- Posts
- 254
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
document.referrer should give you the full URL, not just the domain name. Do you have an example that is doing otherwise?
-
Mar 16, 2001, 12:02 #3
- Join Date
- Feb 2001
- Location
- Dùn Éideann, Alba
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm working off a local copy of IIS, so when I say alert(document.referrer) it returns the domain only, which happens to be set-up as the name of my PC.
Is it possible to get the url of the last page visited in the history, whether it was forward or back in it?
Cheers. Scot-Bot.
-
Mar 16, 2001, 17:34 #4
-
Mar 16, 2001, 17:54 #5
- Join Date
- Feb 2001
- Location
- Van down by the river
- Posts
- 254
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Aha, a local copy. I've seen document.referrer not work when browsing files locally, but when uploaded to a remote web server, it works. My local machine is also running IIS, but it still won't show the referrer until I upload my files. If possible, see if it makes any difference. Not sure why this happens.
Other than that, it should show the full URL of the page visited before landing on your page with document.referrer in it. You can't dig into the user's history, for security reasons.
-
Mar 19, 2001, 04:38 #6
- Join Date
- Feb 2001
- Location
- Dùn Éideann, Alba
- Posts
- 72
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanx for the tips, guys. Unfortunately, though I'm using IIS to develop the site, the site will in the end run on an Apache-Solaris server.
I'm only using Microsoft because I'm more comfortable with it than Unix. So, I can't use ASP to solve the problem: the other web-developer is doing all that nasty Perl/CGI stuff. I can't even do any SSJS.
Ta, anyway. Scot-Bot.
Bookmarks