coderef

Fetch metadata request headersLimited availability

The Sec-Fetch-Dest, Sec-Fetch-Mode, Sec-Fetch-Site, and Sec-Fetch-User HTTP headers provide extra information about the way a request was made, to help servers reject certain kinds of malicious requests.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–79Not supported
80+Supportedsince Feb 4, 2020
Current: 155
Edge
12–79Not supported
80+Supportedsince Feb 7, 2020
Current: 154
Firefox
1–89Not supported
90+Supportedsince Jul 13, 2021
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
18–79Not supported
80+Supportedsince Feb 4, 2020
Current: 155
Firefox Android
4–89Not supported
90+Supportedsince Jul 13, 2021
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Safari, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: Sec-Fetch-Dest.

Feature detection

There’s no simple runtime check for this feature; rely on the support table and test in your target browsers.

Sub-features

Support for each part of the feature (4). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
http.headers.Sec-Fetch-Dest80809016.4809016.4
http.headers.Sec-Fetch-Mode76799016.4769016.4
http.headers.Sec-Fetch-Site76799016.4769016.4
http.headers.Sec-Fetch-User767990✕7690✕