Location interface represents the location (URL) of the object it is linked to. Changes done on it are reflected on the object it relates to. Both the
Window interface have such a linked
Location, accessible via
DOMString containing the host, that is the hostname, a
':', and the port of the URL.
DOMString containing the entire URL. If changed, the associated document navigates to the new page. It can be set from a different origin than the associated document.
DOMString containing the canonical form of the origin of the specific location.
Replaces the current resource with the one at the provided URL. The difference from the
assign() method is that after using
replace() the current page will not be saved in session
History, meaning the user won't be able to use the back button to navigate to it.