History : Object

Array of all of the URLs that a user has visited with the current browser window.

Browser/User Agent Support

IEMozillaNetscapeOperaSafari
3.0+1.0+2.0+7.0+1.0+

Constructors

ConstructorIEMozillaNetscapeOperaSafari
Creates a new instance of a History object.
3.0+1.0+2.0+7.0+1.0+
 

Properties

PropertyIEMozillaNetscapeOperaSafari
Number of URLs that a user has visited with the current browser window.
3.0+1.0+2.0+7.0+1.0+
 

Methods

MethodIEMozillaNetscapeOperaSafari
Goes back one to the last previous URL in the history array.
3.0+1.0+2.0+7.0+1.0+
 
Goes forward one to the next URL in the history array.
3.0+1.0+2.0+7.0+1.0+
 
Goes to the specified previously visited URL from the history array.
3.0+1.0+2.0+7.0+1.0+
 

References

Window.history | Location

Availability

JavaScript 1.0

Constructor Detail

History History()

Creates a new instance of a History object.

Visibility
internal

Property Detail

Number length - read only

Number of URLs that a user has visited with the current browser window.

Method Detail

back() : void

Goes back one to the last previous URL in the history array.

Availability

JavaScript 1.0

forward() : void

Goes forward one to the next URL in the history array.

Availability

JavaScript 1.0

go(Number relative_position, String target_string) : void

Goes to the specified previously visited URL from the history array.

Numberrelative_positionPosition of the URL in the history array.
Stringtarget_stringA string or substring representing the URL in the history array.

Availability

JavaScript 1.0 | enhanced in JavaScript 1.1