This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

replace

Summary

Replaces the current document by loading another document at the specified URL.

Method of dom/Locationdom/Location

Syntax

 location.replace(/* see parameter list */);

Parameters

url

Data-type
String

The URL to insert into the session history.

Return Value

No return value

Notes

When a document is replaced, it is also removed from the history object. Moreover, the user interface navigation methods, such as the Back and Forward buttons, will no longer access the URL.

Attributions