Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not getting a Referer. Any ideas why not? 2

Status
Not open for further replies.

may1hem

Programmer
Jul 28, 2002
262
GB
I'm using a form on a Web page, for people to send me e-mails. The problem is that I'm not getting a value for HTTP-REFERER.

Here is the part of the code that test for a referer:

---------------------
validReferer = false
referer = GetHost(Request.ServerVariables("HTTP_REFERER"))

Response.write(&quot;<br>referer = &quot; & referer)
for each host in referers
if host = referer then
validReferer = true
end if
next
if not validReferer then
if referer = &quot;&quot; then
call AddErrorMsg(&quot;No referer.&quot;)
else
call AddErrorMsg(&quot;Invalid referer: '&quot; & referer & &quot;'.&quot;)
end if
end if
-------------------

I keep receiving the &quot;No referer.&quot; message, which means that the value of HTTP_REFERER is empty. Any ideas why this might be?

Thanks for your help,

May
 
One thing that comes to mind is that there is no referer when you type a url directly into the address bar. You only get a referer if you link from a page. I don't know if this applies to your situation or not, but it's a thought.
 
and there is no referer if they have the page bookmarked or link from a flash movie.


Chris.
Indifference will be the downfall of mankind, but who cares?
 
Thanks for your help guys. A friend helped me identify the actual cause: my firewall software was blocking referrer.

Both were still good suggestions and deserve a *STAR*!

May
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top