admin管理员组文章数量:1026989
I'm not looking for code/how to. Just knowledge.
A client has just e 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...
- 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 monly used?
Finally, Having been on Amazon.co.uk, I then go to Macrumors 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?
Just to make things clear:
- 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
.
I'm not looking for code/how to. Just knowledge.
A client has just e 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...
- 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 monly used?
Finally, Having been on Amazon.co.uk, I then go to Macrumors. 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?
Just to make things clear:
- 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
.
- What do you mean with "history"? Do you meean the browser object where you can navigate with back and forward button, or the history of visted sites? – Reporter Commented Oct 12, 2012 at 11:05
- A history of visited websites... – jamesmhaley Commented Oct 12, 2012 at 11:07
- It is possible to access the URL of the previously-visited page using document.referrer, but not the browser's entire history. – Anderson Green Commented Mar 4, 2022 at 22:21
1 Answer
Reset to default 10No!
There's no browser (that I know of) that legitimately give you access to a user's browsing history.
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.
In the case you're describing (Amazon), yes, cookies are used. To be more accurate, Third-Party Cookies are used.
Update:
I was very interested in your last edit (about history
being pletely open in the past), so I tried to go back a little.
I'm not looking for code/how to. Just knowledge.
A client has just e 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...
- 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 monly used?
Finally, Having been on Amazon.co.uk, I then go to Macrumors 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?
Just to make things clear:
- 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
.
I'm not looking for code/how to. Just knowledge.
A client has just e 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...
- 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 monly used?
Finally, Having been on Amazon.co.uk, I then go to Macrumors. 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?
Just to make things clear:
- 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
.
- What do you mean with "history"? Do you meean the browser object where you can navigate with back and forward button, or the history of visted sites? – Reporter Commented Oct 12, 2012 at 11:05
- A history of visited websites... – jamesmhaley Commented Oct 12, 2012 at 11:07
- It is possible to access the URL of the previously-visited page using document.referrer, but not the browser's entire history. – Anderson Green Commented Mar 4, 2022 at 22:21
1 Answer
Reset to default 10No!
There's no browser (that I know of) that legitimately give you access to a user's browsing history.
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.
In the case you're describing (Amazon), yes, cookies are used. To be more accurate, Third-Party Cookies are used.
Update:
I was very interested in your last edit (about history
being pletely open in the past), so I tried to go back a little.
本文标签: javascriptAccessing a user39s history using JSStack Overflow
版权声明:本文标题:javascript - Accessing a user's history using JS - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745659156a2161784.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论