[Javascript] Logging referring URLs

TomMallard mallard at serv.net
Wed Sep 4 08:27:11 CDT 2002


To do what you want you'll need to submit a form to the server...

Instead of using document.write on the client, include the referrer code on
the server that's issuing the page...you can use
Request.ServerVariables("HTTP_REFERER") to gain what site they came from and
write that into the page to begin with.

tom mallard
seattle

-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of OfficeMgr
Sent: Wednesday, September 04, 2002 5:26 AM
To: javascript at LaTech.edu
Subject: [Javascript] Logging referring URLs


This is my first post to this group and hope that I am doing it correctly.

I have seen the following script, which writes the referring URL to
the user's browser window.

<SCRIPT LANGUAGE="JavaScript">

var where = document.referrer
document.write("<SIZE=+0 FACE=Arial, Century Gothic
color=white>You've been referred by "+where+" ")

</SCRIPT>

Is there some way of writing the document.referrer to a log file on
the host webserver.  The webserver in question does not have any raw
logs available and I'm hoping to make up for it with a simple script?

Cheers,
Brent


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list