user2385737
user2385737

Reputation:

javascript browser history listing

I am familiar with the window.history.back() and the window.history.forward() javascript objects. But is there a method of creating an array with the last "X" number pages viewed.

Upvotes: 23

Views: 66470

Answers (2)

J Max
J Max

Reputation: 2381

Check out:

How do you get the previous url in Javascript?

In short you can get the number of previous sites visited (history.length) but not the url's.

Upvotes: 7

Brad
Brad

Reputation: 163603

No, this would be a huge security problem. You can get history.length to count them if you wish.

Upvotes: 32

Related Questions