The referrer is a notoriously unreliable source of information. Many clients don't send one, sometimes it's filtered out by proxies, occasionally it's even faked up from other criteria (like the requested URL). It's user-supplied data, and as such shouldn't be trusted any more than any other data.
Makeshifts last the longest.