History.previous

JavaScript 1.1+, ECMAScript 1.0+, JScript 3.0+ Nav3+, IE 4+ Syntax

history.previous

Description

The previous property of the History object is used to get the URL for the previous entry in the history list.

Note

In Navigator 4 and later, getting the previous value requires the UniversalBrowserRead privilege.

Example

Listing 7.300 shows an example of how the previous property is used to get the previous URL in the history list.

Listing 7.300 Example of the previous Property
<html>
<head>
<title> Using the previous property of the History object</title>
</head>
<body>
							 <script language="JavaScript"> <!-- Hide // request the Universal Browser Read privilege netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); ...

Get Pure JavaScript 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.