Forum Moderators: open

Message Too Old, No Replies

Browsers reporting wrong REFERRER

Referrer is SOMETIMES from page BEFORE http header redirect - not after

         

vincevincevince

8:46 am on Jul 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have the following arrangement:

domain1/redirect.php (uses header("Location: http ://domain2/page.php")
ie, a redirect to a page on another domain of mine
that page on domain2 contains an IFRAME - in which there is an item with which I log HTTP_REFERER

summarise:
domain2/redirect.php --> domain1/page.php --includes--> domain1/iframe.php (which logs referrer)

now the problem is that in some cases - and i can't find out which :-( the referrer is for redirect.php NOT page.php, which is what i want

this is quite important for me - any help would be most gratefully recieved. i think this is a browser issue?

tedster

10:55 am on Jul 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want accuracy in knowing when page.php calls iframe.php, how about adding a query string to the url in the iframe element's src attribute and any targeted links that change the document that's loaded: iframe.php?r=page.php

Here's a reference thread [webmasterworld.com] you may find helpful, or perhaps upsetting. I'm quoting from message #38 in that thread - from Brett Tabke.

* Some browsers won't send a referral string:
-- An unsupported or optional feature. Many browsers have options to turn off referral string generation as a security precaution.
-- When "open this link in a new window" is selected in the browser.
-- if security settings are high.
-- if using a proxy server or other filtering agent.
-- if it is a secure page. Some browsers won't send an external referral string as a security precaution.

* Most browsers won't send a referrer when:
-- a bookmark is selected,
-- the url is typed into the address bar,
-- some other program launches the url (such as email or news).
-- if the user has your page set as their homepage
-- from some local file based link (viewing a disk based html file).
-- from page links dragged to the address bar on browsers that support it.

* Some browsers will generate false referrers when:
-- they are located on an isp with a proxy cache. This could mean people from that isp are being vastly under counted.
-- if they are on a isp that has a proxy cacher and that proxy cacher is set to rerequest pages with unique referrers. The rest of the pages that have identicle referrers to the previous cached document, will come out of the isp cache. They could view 50 pages and you only show 10 in your logs with unique referrers.
-- browser caching. Some browsers will repeatidly send the initial external referrer to every page it visits on a site.
-- cache validation. Some browsers send a referrer with "If modified since" requests or even simple "head" checks.
-- reloads. If the page is reloaded, referrer may be that very page or the original referrer to that page.
-- javascript navigation plays havoc with referrers. Most js nav systems leave no referrer (unless checked from js).

* Dynamic Content
-- Many sites are mixes of dynamic and static content. Most dynamic documents are not cacheable (cgi based urls). Thus, they can skew referral data dramatically.

vincevincevince

8:12 pm on Jul 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks :-) all is sorted now