如何获得浏览器的JavaScript历史/ jQuery的 [英] How to get browser history javascript/Jquery

查看:137
本文介绍了如何获得浏览器的JavaScript历史/ jQuery的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的浏览器历史记录:
a.com => b.com ==> c.com

My browser history: a.com => b.com ==> c.com

我留在 http://c.com 页面,我如何能得到previous的价值历史(a.com)?
我试图用
     document.referrer
但它返回 http://b.com

I'm stay at http://c.com page and how can I get value of previous history (a.com)? I tried to use document.referrer but it returns "http://b.com"

感谢您的帮助。

推荐答案

这是不可能的,这也算是侵犯了用户的隐私。

It's impossible, it would be a violation of user's privacy.

如果你同时获得 a.com b.com 同意您可以使用Cookie跟踪用户,但很多用户代理(浏览器)发出拒收轨道头阻止第三方Cookie。

If you get both a.com and b.com to agree you can track the user using a cookie, but a lot of user agents (browsers) send do-not-track headers and block third party cookies.

您可以要求用户虽然。

这篇关于如何获得浏览器的JavaScript历史/ jQuery的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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