HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Get the number of URLs in the history list
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 current page.
This property is useful to find out how many pages the user has visited in the current browsing session.
history.back()
will only work if a previous page exists in the history list.
NONE |
Type | Description |
A number | The number of entries in the history list. |
history.length()
is supported in all browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |