Referer字段丢失问题

当从HTTPS页面跳转到HTTP页面时,HTTP Referer字段通常不会被传递,导致大数据埋点丢失来源信息,影响业务数据采集。虽然可通过设置HTML meta标签让浏览器携带Referer,但这并非所有浏览器都支持的标准行为。Referer主要用于告知服务器用户是从哪个页面来的,但在某些情况下,如鼠标拖拽、Flash链接及HTTPS到HTTP的跳转,Referer可能会丢失或不被发送。
摘要由CSDN通过智能技术生成

HTTP协议规定:

Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.

https://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html#sec15.1.3


15.1.3 Encoding Sensitive Information in URI's

Because the source of a link might be private information or might reveal an otherwise private information source, it is strongly recommended that the user be able to select whether or not the Referer field is sent. For example, a browser client could have a toggle switch for browsing openly/anonymously, which would respectively enable/disable the sending of Referer and From information.

Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值