tags:

views:

727

answers:

2

There is window.history object in javascript.

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)

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.

Do you have any ideas?

+6  A: 

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

chaos
+1  A: 

You will not be able to get a history of where the user has been before they navigated to your page. However, if you're only trying to track navigation around your site, you may be able to reorganize your page flow to use something like Really Simple History, a framework-independent library for "the management of bookmarking and browser history in Ajax/DHTML applications."

Brian Ramsay