Determining referring URL and search term

G

George

I have very limited experience with Javascript. Can someone refer me to
info on how to determine the referring URL and the search term used by a
visitor just prior to his landing on my web page?

Many thanks,
George
 
E

Evertjan.

George wrote on 04 feb 2006 in comp.lang.javascript:
I have very limited experience with Javascript. Can someone refer me to
info on how to determine the referring URL and the search term used by a
visitor just prior to his landing on my web page?

You cannot in general.

Only if your page is reached by a referral from another page,
you can with some browsers get a referral string:

Clientside javascript:

<script type='text/javascript>
document.write( document.referrer );
</script>

Serverside ASP javascript:

<% = request.ServerVariables("HTTP_REFERER") %>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top