使用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.