检测客户在其网站之后访问的页面
(如果我错了,请纠正我。)服务器主机可以检测访问者在访问主机站点之前和之后访问的页面。
服务器主机可以在多大程度上接收有关其客户端在访问当前页面之前和之后访问的站点的信息?
(Correct me if I'm wrong.) A server host can detect the pages that a visitor goes to before and after they visited the host's site.
To what extent can a server host receive information on what sites their client visits before and after the visit to the present page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能有两种方法可以做到这一点,这两种方法都有不同的目的:
如果用户单击另一个页面上的链接转到您的页面,他们来自的页面(引荐来源)将在
Referer
(原文如此)HTTP 标头中发送。 (请参阅HTTP 规范。)大多数 Web 框架和面向 Web 的语言都提供了一种简单的方法来访问此值,并且大多数 Web 分析工具都会立即对其进行处理。 (具体来说,如何获得该值取决于您使用的工具。)不过,有三个注意事项:
如果您想查看用户在您控制的页面上移动的位置,您可以通过设置每次访问具有唯一值的 Cookie 并存储每个页面加载来实现此目的。
与上面的一样,如何执行此操作取决于您使用的工具,并且有一些注意事项:
Referer
标头一样,一些精通技术且注重隐私的用户喜欢在关闭 Cookie 的情况下进行浏览。There are probably two ways of doing this, which both serve different purposes:
If a user clicks a link on another page to go to your page, the page they came from (the referrer) will be sent in the
Referer
(sic) HTTP header. (See the HTTP specification.)Most web frameworks and web-oriented languages provide an easy way to access this value, and most web analytics tools will process it out of the box. (Specifically how you go about getting at this value depends on what tools you use.) There are three caveats, though:
If you want to see where a user travels across pages which you control, you can do this by setting a cookie with a unique value per visit, and storing each page load.
Like the above one, how you go about doing this depends on what tools you use, and there are a few caveats:
Referer
header, some tech-savvy and privacy-conscious users like to browse with cookies switched off.