Async functionsBaseline · Widely available
The async and await keywords allow you to use the asynchronous, promise-based behavior of a function without using promise chains.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Apr 5, 2017. Widely available since Oct 5, 2019.
Browser support
DesktopChrome
1–54Not supported
55+Supportedsince Dec 1, 2016
Current: 155Edge
12–14Not supported
15+Supportedsince Apr 5, 2017
Current: 154Firefox
1–51Not supported
52+Supportedsince Mar 7, 2017
Current: 157Safari
1–10Not supported
10.1+Supportedsince Mar 27, 2017
Current: 27MobileChrome Android
18–54Not supported
55+Supportedsince Dec 6, 2016
Current: 155Firefox Android
4–51Not supported
52+Supportedsince Mar 7, 2017
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
async function loadUser(id) {
try {
const res = await fetch(`/api/users/${id}`);
return await res.json();
} catch (err) {
console.error("Failed to load user", err);
}
}Feature detection
JS · check before using
// Syntax can't be tested with an if-statement — an unsupported
// browser fails to parse the whole script. Either transpile for older
// targets (e.g. Babel/TypeScript/esbuild), or probe in isolation:
let supported = true;
try {
new Function("/* code that uses the syntax */");
} catch {
supported = false;
}This is a language syntax feature.
Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (5). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| AsyncFunction | 55 | 15 | 52 | 10.1 | 55 | 52 | 10.3 |
| AsyncFunction.AsyncFunction | 55 | 15 | 52 | 10.1 | 55 | 52 | 10.3 |
| async_function | 55 | 15 | 52 | 10.1 | 55 | 52 | 10.3 |
| await | 55 | 14 | 52 | 10.1 | 55 | 52 | 10.3 |
| async_function | 55 | 15 | 52 | 10.1 | 55 | 52 | 10.3 |