Name

History

Synopsis

window.history
history

Methods

back( )

Goes back to a previously visited URL in the browsing history. Returns nothing.

forward( )

Goes forward in the browsing history. Returns nothing.

go(n)

Goes to the nth URL relative to the currently displayed URL. Calling this method with -1 is the same as calling the back( ) method. Returns nothing.

Get JavaScript Pocket Reference, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.