FetchBaseline · Widely available
The fetch() method makes asynchronous HTTP requests.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 27, 2017. Widely available since Sep 27, 2019.
Browser support
DesktopChrome
1–41Not supported
42+Supportedsince Apr 14, 2015
Current: 155Edge
12–13Not supported
14+Supportedsince Aug 2, 2016
Current: 154Firefox
1–38Not supported
39+Supportedsince Jul 2, 2015
Current: 157Safari
1–10Not supported
10.1+Supportedsince Mar 27, 2017
Current: 27MobileChrome Android
18–41Not supported
42+Supportedsince Apr 15, 2015
Current: 155Firefox Android
4–38Not supported
39+Supportedsince Jul 2, 2015
Current: 157Safari iOS
1–10Not supported
10.3+Supportedsince Mar 27, 2017
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
JS
const response = await fetch("/api/users", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name: "Ada" }),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const user = await response.json();Feature detection
JS · check before using
if ("fetch" in globalThis) {
// fetch() is available
} else {
// fall back to XMLHttpRequest or load a polyfill
}Specification
Usage share
Sub-features
Support for each part of the feature (76). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Headers | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Headers.@@iterator | 42 | 16 | 44 | 10.1 | 42 | 44 | 10.3 |
| Headers.Headers | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Headers.append | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Headers.delete | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Headers.entries | 42 | 16 | 44 | 10.1 | 42 | 44 | 10.3 |
| Headers.forEach | 42 | 14 | 47 | 10.1 | 42 | 47 | 10.3 |
| Headers.get | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Headers.getSetCookie | 113 | 113 | 112 | 17 | 113 | 112 | 17 |
| Headers.has | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Headers.iterate_combined_duplicates | 57 | 16 | 57 | 10.1 | 57 | 57 | 10.3 |
| Headers.iterate_lexicographically | 57 | 18 | 57 | 10.1 | 57 | 57 | 10.3 |
| Headers.keys | 42 | 16 | 44 | 10.1 | 42 | 44 | 10.3 |
| Headers.set | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Headers.values | 42 | 16 | 44 | 10.1 | 42 | 44 | 10.3 |
| Request | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.Request | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.Request.cross_origin_stripped | 69 | 15 | 54 | 10.1 | 69 | 54 | 10.3 |
| Request.Request.options_parameter | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.Request.options_parameter.body | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
Show 56 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Request.Request.options_parameter.keepalive | 66 | 15 | 133 | 13 | 66 | 133 | 13 |
| Request.Request.options_parameter.referrer | 47 | 15 | 47 | 10.1 | 47 | 47 | 10.3 |
| Request.Request.response_body_readablestream | 43 | 79 | 65 | ✕ | 43 | 65 | 10.3 |
| Request.arrayBuffer | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.blob | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.bodyUsed | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.bytes | 132 | 132 | 128 | 18 | 132 | 128 | 18 |
| Request.cache | 64 | 14 | 48 | 10.1 | 64 | 48 | 10.3 |
| Request.cache.only-if-cached | 64 | 79 | 50 | 10.1 | 64 | 50 | 10.3 |
| Request.clone | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.credentials | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.credentials.default_same-origin | 72 | 18 | 61 | 12.1 | 72 | 61 | 12.2 |
| Request.destination | 65 | 14 | 61 | 10.1 | 65 | 61 | 10.3 |
| Request.duplex | 131 | 131 | ✕ | ✕ | 131 | ✕ | ✕ |
| Request.headers | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.isHistoryNavigation | 69 | 79 | ✕ | ✕ | 69 | ✕ | ✕ |
| Request.json | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.keepalive | 66 | 15 | 133 | 13 | 66 | 133 | 13 |
| Request.method | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.mode | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.mode.navigate_mode | 49 | ≤18 | 46 | 10.1 | 49 | ✕ | 10.3 |
| Request.redirect | 46 | 14 | 43 | 10.1 | 46 | 43 | 10.3 |
| Request.referrer | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.referrerPolicy | 52 | 14 | 47 | 10.1 | 52 | 47 | 10.3 |
| Request.text | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Request.url | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.Response | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.Response.accept_readablestream | 52 | 79 | 39 | 10.1 | 52 | 39 | 10.3 |
| Response.Response.body_parameter_optional | 42 | 79 | 59 | 10.1 | 42 | 59 | 10.3 |
| Response.arrayBuffer | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.blob | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.body | 43 | 14 | 65 | 10.1 | 43 | 65 | 10.3 |
| Response.body.readable_byte_stream | 116 | 116 | 102 | 26.4 | 116 | 102 | 26.4 |
| Response.bodyUsed | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.bytes | 132 | 132 | 128 | 18 | 132 | 128 | 18 |
| Response.clone | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.error_static | 43 | 16 | 39 | 10.1 | 43 | 39 | 10.3 |
| Response.headers | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.json | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.json_static | 105 | 105 | 115 | 17 | 105 | 115 | 17 |
| Response.ok | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.redirect_static | 44 | 16 | 39 | 10.1 | 44 | 39 | 10.3 |
| Response.redirected | 57 | 16 | 49 | 10.1 | 57 | 49 | 10.3 |
| Response.status | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.statusText | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.text | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.type | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| Response.url | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| fetch | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| fetch.authorization_removed_cross_origin | ✕ | ✕ | 111 | 16.1 | ✕ | 111 | 16.1 |
| fetch.blob_data_support | 48 | 79 | 39 | 10.1 | 48 | 39 | 10.3 |
| fetch.options_parameter | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| fetch.options_parameter.body | 42 | 14 | 39 | 10.1 | 42 | 39 | 10.3 |
| fetch.options_parameter.keepalive | 66 | 15 | 133 | 13 | 66 | 133 | 13 |
| fetch.options_parameter.referrerPolicy | 52 | 79 | 52 | 11.1 | 52 | 52 | ✕ |