HTTP Referer并不总是被传递 [英] HTTP Referer not always being passed
问题描述
我有一个记录用户访问量的应用程序.这些访问都无法直接访问,这些访问中有100%是从另一个站点引荐的.
I have an application which records users visits. None of these visits are directly accessed, 100% of these visits are referred from another site.
我正在将$_SERVER['HTTP_REFERER']
传递到数据库.大约35%的登录主菜通过了引荐来源网址,其余为空白.
I am passing $_SERVER['HTTP_REFERER']
through to the database. Approximately 35% of the logged entrees pass a referer, the rest are blank.
这有原因吗?
推荐答案
如果用户直接访问您的网站,则没有引荐来源.他们也可能进行了设置,因此他们的浏览器从不发送引荐来源网址.
If a user visits your site directly, there is no referrer. It's also possible they have set it up so their browser never sends the referrer.
根据此答案,浏览器不必在进行元刷新时一定会发送引荐来源网址.
According to this answer, browsers do not necessarily send a referrer when doing a meta refresh.
这篇关于HTTP Referer并不总是被传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!