最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Read Chrome browsing history within extension - Stack Overflow

programmeradmin1浏览0评论

How can I check if a certain link is found in Chrome's browsing history(on the puter that accesses the link) using JavaScript or jQuery? I am interested (if any) in the functions that I have to use. Also how can I get the date and time of the accessed link?

How can I check if a certain link is found in Chrome's browsing history(on the puter that accesses the link) using JavaScript or jQuery? I am interested (if any) in the functions that I have to use. Also how can I get the date and time of the accessed link?

Share Improve this question edited Nov 9, 2010 at 12:24 Marcel Korpel 21.8k6 gold badges62 silver badges80 bronze badges asked Nov 9, 2010 at 12:07 BogdanBogdan 4612 gold badges6 silver badges18 bronze badges 1
  • 1 You should clarify that this question is about programming an extension and not a web page. – Caleb Commented Nov 9, 2010 at 12:25
Add a ment  | 

3 Answers 3

Reset to default 10

Retrieving the users history from javascript launched from a web page is impossible due to obvious blatant security issues.

Retrieving the users history from javascript running in an extension is possible, but doing so requires elevated permissions that the user has to grant after being warned. In summary you are probably looking for the chrome.history.getVisits() function. You can find more information on how to access the history using chrome.history here and the resulting security warnings given to the user here.

Nonono! That cannot happen. Unless you make a plugin, but I still doubt it.

This might be off topic but you might be interested in google analytics.

This is just not possible with Chrome because of security. What you would have to do is use cookies and add to the cookie each page the user is on along with the time visited.

Problem with this it will only track a user on your site not others. Cookies are only suppose to hold small amounts of info not long tracks of what page your user has been on. Also a user can disable cookies...

Another way is maybe doing this serverside and tracking the users IP through your pages and keep a list of what pages your user is visiting.

发布评论

评论列表(0)

  1. 暂无评论