使用JS访问用户的历史记录 [英] Accessing a user's history using JS

查看:462
本文介绍了使用JS访问用户的历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不需要代码/方法。只是知识。

一个客户刚来找我们一个问题:我们能否从横幅广告中访问用户的历史记录,以便给他们一些有针对性的广告

A client has just come to us with a question: Can we access the user's history from within a banner advert to give them some targeted advertising based on their history.

很明显,这表示隐私问题,但是我需要给出一个很好的理由说明为什么从技术上讲,它不是可行的选择。

Obviously, this presents a privacy issue, but I need to give a good case for why it is technically not a viable option.

所以我有几个问题...

So I have a few questions...


  1. 其中浏览器 still (如果有)支持使用 window.history 访问用户的历史记录。

  2. 如果有的话做,有些不做。

  3. 如果所有浏览器都允许它(我还没有找到一个可行的脚本),为什么它不常用?

  4. li>
  1. Which browsers still, if any, support accessing a user's history, using window.history.
  2. If some do and some don't. When did those who don't allow it stop allowing it?
  3. If all browsers allow it (I have yet to find a script that works), why is it not commonly used?

最后,
去过Amazon.co.uk之后,我去了Macrumors.com,广告给了我基于关于我购买/看过的产品。我猜这只是基于Cookie /亚马逊已实施的系统?

Finally, Having been on Amazon.co.uk, I then go to Macrumors.com and the adverts give me adverts based on products I have bought/looked at. I'm guessing this is just based on cookies/a system that amazon has implemented?

只是要弄清楚一点:


  • 我知道这是一个隐私问题。我不是在寻找代码/做这件事的方法(如上所述)

  • 有一些方法可以嗅探页面中的访问链接。

  • 过去曾经有一种使用JavaScript history 对象的方式来列出历史记录中的所有对象(来自当前站点)。 history.length 现在仍然有效。我似乎记得有些浏览器只为每个项目返回 undefined ,有些浏览器将它们作为不可读的 object 返回。

  • I know it is a privacy issue. I am not looking for code/a way to do it (as I mentioned above)
  • There are ways to "sniff" for visited links within a page.
  • There used to be a way using the JavaScript history object, to list all the objects within your history (from the current site). history.length still works now. I seem to remember some browsers only returning undefined for each item, some returning them as an unreadable object.

推荐答案

否!

没有(据我所知)浏览器可以合法地让您访问用户的浏览历史记录。

There's no browser (that I know of) that legitimately give you access to a user's browsing history.

事件,通过利用浏览器的某些行为。最近,在Firefox 16中,有一个漏洞,如果利用得当,它可以让您浏览用户的浏览历史记录。

There has been incidents where it was possible to do so by exploiting certain behaviors of the browser. Recently, in Firefox 16 there's a vulnerability that, if exploited properly, allows you to peek into the user's browsing history.

在您描述的情况下(Amazon),使用cookie。为了更加准确,使用了第三方Cookie

In the case you're describing (Amazon), yes, cookies are used. To be more accurate, Third-Party Cookies are used.

更新:
我对您的上次编辑非常感兴趣(关于历史记录完全是

这篇关于使用JS访问用户的历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆