The location object contains information about the current URL. The location object is a property of the window object.
The replace() method replaces the current document with a new one.
replace() | assign() |
---|---|
replace() removes the current URL from the document history. | The assign() method loads a new document. |
- With replace() it is not possible to use "back" to navigate back to the original document.