MDN self-hosted library · e01.org

HTMLAreaElement: referrerPolicy property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<img usemap="#my-map" width="100" height="100" src="/img/logo@2x.png" />
<map id="my-map" name="my-map"></map>
js
const elt = document.createElement("area");
elt.href = "/img2.png";
elt.shape = "rect";
elt.referrerPolicy = "no-referrer";
elt.coords = "0,0,100,100";
const map = document.getElementById("my-map");

map.appendChild(elt);
// When clicked, the area's link will not send a referrer header.