使用javascript获取完整的url历史记录 [英] get full url history using javascript

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

问题描述

javascript中有window.history对象。

There is window.history object in javascript.

可以使用window.history.lenght
或重定向到上一个来获取历史记录的长度历史记录中的/ next url使用history.go(N)

It's possible to get lenght of the history using window.history.lenght or redirect to the previous / next url in the history using history.go(N)

是否有获取历史对象URL的技巧?因为我认为带有历史对象的
是不可能的,因为网址甚至不是只读的。

Is there any trick to get URL of the history objects? As i see it's not possible with history object, because urls are even not readonly.

你有什么想法吗?

推荐答案

在任何主流浏览器中都不可能,也不会这样。这将是一个严重的隐私和同源政策违规。

This is not possible, nor will it ever be, in any major browser. It would be a severe privacy and same origin policy violation.

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

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