Javascript Reference
Categories: history

javascript history Description

@March 15, 2008, 1:22 a.m.
historyFirefox/Netscape/NN 2 IE 3 Chrome/Safari/DOM n/a  

  

During a browser session, the browser uses the history object to maintain a list of URLs visited by the user. This list (stored as an array) is used by the browser to assist with navigation via the Back and Forward buttons. Due to the sensitive nature of the private information stored in the history object, not many of the details are exposed to scripts that could capture such information and surreptitiously submit it to a server. In more recent browser versions, each window maintains its own history object.

 

To answer a frequently-asked question: no, you cannot block or disable the Back button's action. At most, you can prevent the current page from being entered into the browser's history when a user clicks on a link from the page. Accomplish this by scripting the links with the location.replace( ) navigation method. Navigator 4 and later (with signed scripts and the user's explicit approval) can remove the toolbar from the browser window (see the locationbar object discussion). Or, you can open a new window without the toolbar (see the window.open( ) method).

 
Object Model Reference
 
[window.]history
 
Object-Specific Properties
 
currentlengthnextprevious
 
Object-Specific Methods
 
back( )forward( )go( )item( )
 
Object-Specific Event Handler Properties

None.

Under moderation.
ascendox23rc - 2016-05-16

Powered by Linode.