Forum Moderators: DixonJones
I think a bug has crept into a recent user agent (poss. IE6 on XP) that under a certain set of conditions will send the URL of a recently visited page as the referrer field in a request generated by you simply typing a URL into the address bar.
You can see what referer your browser sent for a page you're viewing in your browser using this bookmarklet:
javascript:alert(document.referrer)
(Type that URL into the address bar, or bookmark it and then click it whenever you want to see the referer for the page you're viewing.)
Mozilla Firebird's "Page Info" dialog (Ctrl+I) also shows referers.
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser); # this prints out errors to the screen (mostly for debugging)
# Print Beginning of HTML
print "Content-Type: text/html\n\n";
print "<html><head><title>test</title></head>\n";
print "<body><h1>Ref Check</h1>\n";
print "$ENV{'HTTP_REFERER'} ";
# Print End of HTML
print "</body></html>\n";
and when entering the url from google, nothing was returned. So I set a page with the link, and when clicked on, it returned HTTP_REFERER. Thanks for correcting me jesserud. One learns something new everyday hopefully.