Fetch priorityBaseline · Newly available
The fetch() priority option and the fetchpriority HTML attribute give hints to the browser about which requests to do before other requests of the same type.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Oct 29, 2024.
Browser support
DesktopChrome
1–102Not supported
103+Supportedsince Jun 21, 2022
Current: 155Edge
12–102Not supported
103+Supportedsince Jun 23, 2022
Current: 154Firefox
1–131Not supported
132+Supportedsince Oct 29, 2024
Current: 157Safari
1–17.1Not supported
17.2+Supportedsince Dec 11, 2023
Current: 27MobileChrome Android
18–102Not supported
103+Supportedsince Jun 21, 2022
Current: 155Firefox Android
4–131Not supported
132+Supportedsince Oct 29, 2024
Current: 157Safari iOS
1–17.1Not supported
17.2+Supportedsince Dec 11, 2023
Current: 27How to use
Every current browser supports this, but it only became Baseline on Oct 29, 2024. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN: fetchPriority.
Feature detection
JS · check before using
if ("HTMLImageElement" in globalThis && "fetchPriority" in HTMLImageElement.prototype) {
// HTMLImageElement.fetchPriority is available
}Sub-features
Support for each part of the feature (12). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLImageElement.fetchPriority | 102 | 102 | 132 | 17.2 | 102 | 132 | 17.2 |
| HTMLLinkElement.fetchPriority | 102 | 102 | 132 | 17.2 | 102 | 132 | 17.2 |
| HTMLScriptElement.fetchPriority | 102 | 102 | 132 | 17.2 | 102 | 132 | 17.2 |
| Request.Request.options_parameter.priority | 101 | 101 | 132 | 17.2 | 101 | 132 | 17.2 |
| fetch.options_parameter.priority | 101 | 101 | 132 | 17.2 | 101 | 132 | 17.2 |
| img.fetchpriority | 101 | 101 | 132 | 17.2 | 101 | 132 | 17.2 |
| link.fetchpriority | 101 | 101 | 132 | 17.2 | 101 | 132 | 17.2 |
| script.fetchpriority | 101 | 101 | 132 | 17.2 | 101 | 132 | 17.2 |
| http.headers.Link.fetchpriority | 103 | 103 | 132 | 17.2 | 103 | 132 | 17.2 |
| feImage.fetchpriority | ✕ | ✕ | 140 | ✕ | ✕ | 140 | ✕ |
| image.fetchpriority | ✕ | ✕ | 140 | ✕ | ✕ | 140 | ✕ |
| script.fetchpriority | ✕ | ✕ | 140 | ✕ | ✕ | 140 | ✕ |