There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.

This may take a few seconds.



location: ["](url)["] [every (time)] [after (time)];

This command does a hard redirect of the current page to the specified URL. Optional double-quotes surround the URL.

The following example redirects the current page to an outside URL:

#mdnLink:click {
    location: "";

Note: It runs a Javascript document.location.href on the current document, or tries to do it on the target document if the target is an iframe.

For more details on document.location.href, see here:


Click the button below for an 80s throwback.

#locationButton:click {
    location: "";
<p>Click the button below for an 80s throwback.</p>

<button id="locationButton">Click me</button>