Provides access to the browser history that contains the URLs of visited pages.

Because of security restrictions, the URLs listed in the browser history are read-only, but it is allowed to navigate in the history with the back, forward or go methods.
If you want to load a new document, use the location object instead.

Example HTML code 1:

This example illustrates the use of the history object:

<head><scripttype="text/javascript">function GoBack () {
history.back ();
}
function GoForward () {
history.forward ();
}
</script></head><body>
Click on the following anchors first to add items to the history list.
<br/><ahref="#target1">First anchor</a><aname="target1"></a><br/><ahref="#target2">Second anchor</a><aname="target2"></a><br/><br/>
Use these buttons to navigate in the history list:
<buttononclick="GoBack ();">go back in the history list</button><buttononclick="GoForward ();">go forward in the history list</button></body>