http_referer question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

http_referer question

Post by jaymoore_299 »

How dependable is this variable? If I get 1,000 visits, then what percentage of the browsers would not send me this information? Anyone know which particular browsers do not send this information, or other reasons why it wouldn't be sent?
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: http_referer question

Post by Roja »

jaymoore_299 wrote:How dependable is this variable?
http://en.wikipedia.org/wiki/Referer says..
As referer information can violate privacy, some browsers have the option of disabling this functionality. Some proxy and firewall software will also block referers, to avoid leaking the location of non-public websites.
In other words, its almost completely not dependable.
jaymoore_299 wrote:If I get 1,000 visits, then what percentage of the browsers would not send me this information?
In practice, I've seen it around the 30% mark - 30% won't send it. Of course, your mileage may vary.
jaymoore_299 wrote:Anyone know which particular browsers do not send this information, or other reasons why it wouldn't be sent?
There are a shopping list of reasons why it wouldnt be sent:

- The user can disable it in Firefox, Opera, and even in some IE-based browsers
- The proxies or firewalls that the user goes through may strip it, forge it, replace it
- The user may forge it

In short, its really unreliable.
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

Post by jaymoore_299 »

thanks for that response, very helpful. I guess I'll be using parameters in the urls or sessions instead.
Post Reply