浏览器中丢失referrer和HTTPS=>HTTP丢失referer的解决:基于会话的站内来源地址URL...
source link: https://blogread.cn/it/article/8290?f=hot1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
浏览器中丢失referrer和HTTPS=>HTTP丢失referer的解决:基于会话的站内来源地址URL还原
Referer丢了会导致很多来源分析就做不了了,以前referer丢失来源有三种:
0 代码因素:一些js构造链接打开的模式会造成referer丢失,解决方法是尽量避免windows.open meta refresh等;
1 代码+浏览器因素:meta js打开新窗口 部分浏览器会丢失
2 协议因素:https协议降级http,解决的方法是靠https端增加声明,比如:通过meta的方式:referer meta
<meta name="referrer" content="no-referrer|no-referrer-when-downgrade|origin|origin-when-crossorigin|unsafe-url">
目前搜索引擎https后的页面:Google用的是orgin 百度用的always或者通过http header的方式,总体来说,这些问题是可以通过代码修复的。现在有多了几种:主要来自多核浏览器使用率的增加。
3 多核浏览器切换内核/隐私浏览模式,部分第三方浏览器版本会丢referer,360支持renderer 标签,可以强制使用某种内核进行页面渲染,比如:webkit。
4 浏览器的各种鼠标手势等高级功能,会丢失referer,
5 来自移动app:微信 微博的点击; 从实际的项目来看,需要修补referer丢失的环节太多,开发测试量也很大(尤其加上浏览器因素后),更简单的方法是需要通过服务端设置会话cookie,然后通过日志分析系统:跟踪同一个cookie的访问路径进行完整路径的模拟还原。
建议继续学习:
扫一扫订阅我的微信号:IT技术博客大学习
Recommend
-
108
Professionals | Community Groups Programs | Google Developers
-
43
Still Using InstallBroadcast? Switch to the Play Referrer API by March 1, 2020 2019-11-16adminAndroi...
-
27
如果你的站点有使用 Referer 标头收集网页的访问来源信息,则此策略变化可能对你的程序造成影响,请仔细阅读。 在开始阅读本文之前,如果你不理解 site 和 origin
-
7
By ...
-
3
by zhangxinxu from http://www.zhangxinxu.com/wordpress/?p=5934 本文可全文转载,但需得到原作者书面许可,同时保留原作者和出处,摘要引流则随...
-
2
Sam Edwards in Updates | F...
-
4
Ghost Private Draft URLs Leaked via Outlink Referrer Header Posted by Curiositry...
-
4
Sorry, you have been blocked You are unable to access azhuge233.com Why have I been blocked? This website is...
-
3
by zhangxinxu from https://www.zhangxinxu.com/wordpress/?p=10967 鑫空间-鑫生活 本文欢迎分享与聚合,全文转载...
-
2
Using Browser Session Storage To Add Referrer & UTM Params 2023-11-06 Categories: Customer Insights Journ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK