使用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...
- 其中浏览器 still (如果有)支持使用
window.history
访问用户的历史记录。 - 如果有的话做,有些不做。
- 如果所有浏览器都允许它(我还没有找到一个可行的脚本),为什么它不常用?
- li>
- Which browsers still, if any, support accessing a user's history, using
window.history
. - If some do and some don't. When did those who don't allow it stop allowing it?
- 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 returningundefined
for each item, some returning them as an unreadableobject
.
否!
没有(据我所知)浏览器可以合法地让您访问用户的浏览历史记录。
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.
更新:
我对您的上次编辑非常感兴趣(关于历史记录
完全是