History length Property
Return the number of URLs in the history list:
The output of the code above will be:
Try it yourself »
Definition and Usage
The length property returns the number of URLs in the history list of the current browser window.
The property returns at least 1, because the list includes the currently loaded page.
Tip: This property is useful to find out how many pages the user has visited in the current browsing session.
Note: Internet Explorer and Opera start at 0, while Firefox, Chrome, and Safari start at 1.
Note: Maximum length is 50.
The length property is supported in all major browsers.
|Return Value:||An integer representing the number of entries in the session history|
Thank You For Helping Us!
Your message has been sent to W3Schools.