Forum Moderators: coopster & phranque

Message Too Old, No Replies

Referer, links and New Windows

Perl workaround to resolve this

         

HocusPocus

2:14 am on Jan 29, 2003 (gmt 0)

10+ Year Member



It's my understanding when a user on siteA clicks to siteB via a TARGET=_blank link, the referer env variable does not necessarily get passed to SiteB's server.

Can anyone suggest a workaround to resolve this?

Any help appreciated, pulling my hair out.

Powdork

2:39 am on Jan 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have not heard of this. Of all the sites i link to with target="_blank" I have no problems seeing myself as the referrer. It doesn't it can't happen though.

austtr

4:03 am on Jan 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HocusPocus....

Does the link from site A to site B use stock standard html code or is there a script of any kind involved?

I have a similar problem where I use a cgi redirect script to make the link and also force an entry into the site A log file.... which can then be counted.

But the logs for site B will not show site A as the referrer. Nobody has ever been able to tell me why, not the script authors, the tech support of sites A and B nor the tech support from the log analysis company..... plus I have tried many "click thru manager" scripts all with the same result at site B.

The most recent suggestion is "the referer env variable is not getting passed to SiteB's server" which is exactly as described in your post.

But... and this gets to your question, if I take out the redirect script and just use plain vanilla html for the links, then site B will show site A as the referrer and that does include opening into a new window.

HocusPocus

9:37 am on Jan 29, 2003 (gmt 0)

10+ Year Member



Thanks for your replies.

Maybe a bit more detail on my part wouldn’t go amiss. I need to check that siteA is allowed to access siteB.pl as I want to check who is accessing the script. The client's requirent is that only ‘allowed()’ sites are permitted to use the script. The problem is, I would preferably like SiteA to open siteB.pl in a new window. As a relative newbie to Perl I thought that referer var would do the trick. However, the referer var has values siteA, siteB or nothing.

I thought a possible work round could be to have a small page or script on siteA's server that is called when the user clicks the link and opens a new window. Say, the click calls siteA.pl that redirects to siteB.pl. This method seems to be a bit of a fudge hence the post. I see that Austtr is having similar problems.

Is the referer var the way forward? Is this recommended for checking access to scripts? Has anybody any solutions/ guidance as to what I am trying to implement?

Any thoughts would be greatly received.