HTML DOM
The fetchPriority property of the HTMLImageElement interface represents a hint to the browser indicating how it should prioritize fetching a particular image relative to other images. It reflects the <img> element's fetchpriority content attribute.
Value
A string whose value is one of high, low, or auto. For their meanings, see the HTML fetchpriority attribute.
Examples
const img = new Image();
img.fetchPriority = "high";
img.src = "img/logo.png";
Specifications
Browser compatibility
See also
- HTMLLinkElement.fetchPriority
- HTMLScriptElement.fetchPriority
- HTTP Link header
- Optimize resource loading with the Fetch Priority API for information about how this API affects priorities on Chrome.
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
