MDN self-hosted library · e01.org

HTMLLinkElement: fetchPriority property

HTML DOM

Open notebook · 1 cells web-api-instance-property upstream source

HTML DOM

The fetchPriority property of the HTMLLinkElement interface represents a hint to the browser indicating how it should prioritize fetching a particular resource relative to other resources of the same type. It reflects the <link> element's fetchpriority content attribute.

Value

A string. For the permitted values, see the HTML fetchpriority attribute.

Examples

const preloadLink = document.createElement("link");
preloadLink.href = "my-image.jpg";
preloadLink.rel = "preload";
preloadLink.as = "image";
preloadLink.fetchPriority = "high";
document.head.appendChild(preloadLink);

Specifications

Browser compatibility

See also