Javatpoint Logo
Javatpoint Logo

JavaScript History Object

The JavaScript history object represents an array of URLs visited by the user. By using this object, you can load previous, forward or any particular page.

The history object is the window property, so it can be accessed by:


Property of JavaScript history object

There are only 1 property of history object.

1lengthreturns the length of the history URLs.

Methods of JavaScript history object

There are only 3 methods of history object.

1forward()loads the next page.
2back()loads the previous page.
3go()loads the given page number.

Example of history object

Let’s see the different usage of history object.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA