XMLHttpRequestBaseline · Widely available
The XMLHttpRequest API makes HTTP requests. It's the predecessor to fetch(). Also known as XHR.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jul 29, 2015. Widely available since Jan 29, 2018.
Browser support
DesktopChrome
1+Supportedsince Dec 11, 2008
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1+Supportedsince Nov 9, 2004
Current: 157Safari
1–2Not supported
3+Supportedsince Oct 26, 2007
Current: 27MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157Safari iOS
1+Supportedsince Jun 29, 2007
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: FormData.
Feature detection
JS · check before using
if ("FormData" in globalThis) {
// FormData is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (72). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| FormData | 5 | 12 | 4 | 5 | 18 | 4 | 5 |
| FormData.@@iterator | 50 | 18 | 44 | 11.1 | 50 | 44 | 11.3 |
| FormData.FormData | 5 | 12 | 4 | 5 | 18 | 4 | 5 |
| FormData.FormData.submitter | 112 | 112 | 111 | 16.4 | 112 | 111 | 16.4 |
| FormData.append | 5 | 12 | 4 | 5 | 18 | 4 | 5 |
| FormData.append.filename_parameter | 16 | 12 | 22 | 6 | 18 | 22 | 6 |
| FormData.delete | 50 | 18 | 39 | 11.1 | 50 | 39 | 11.3 |
| FormData.entries | 50 | 18 | 44 | 11.1 | 50 | 44 | 11.3 |
| FormData.forEach | 50 | 18 | 47 | 11.1 | 50 | 47 | 11.3 |
| FormData.get | 50 | 18 | 39 | 11.1 | 50 | 39 | 11.3 |
| FormData.getAll | 50 | 18 | 39 | 11.1 | 50 | 39 | 11.3 |
| FormData.has | 50 | 18 | 39 | 11.1 | 50 | 39 | 11.3 |
| FormData.keys | 50 | 18 | 44 | 11.1 | 50 | 44 | 11.3 |
| FormData.set | 50 | 18 | 39 | 11.1 | 50 | 39 | 11.3 |
| FormData.values | 50 | 18 | 44 | 11.1 | 50 | 44 | 11.3 |
| FormData.worker_support | 50 | 79 | 39 | 13.1 | 50 | 39 | 13.4 |
| ProgressEvent | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 2 |
| ProgressEvent.ProgressEvent | 16 | 14 | 18 | 6 | 18 | 18 | 6 |
| ProgressEvent.ProgressEvent.loaded_total_options_accept_double | 136 | 136 | 138 | ✕ | 136 | 138 | ✕ |
| ProgressEvent.lengthComputable | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 2 |