Web/API/XMLHttpRequestResponseType

From Get docs


The XMLHttpRequestResponseType type is an enumerated set of strings which are used to specify the type of data contained in the response of an XMLHttpRequest. These values are used when getting or setting the responseType on the request.

Values

""
An empty responseType string is treated the same as "text", the default type.
arraybuffer
The response is a JavaScript ArrayBuffer containing binary data.
blob
The response is a Blob object containing the binary data.
document
The response is an HTML Document or XML XMLDocument, as appropriate based on the MIME type of the received data. See HTML in XMLHttpRequest to learn more about using XHR to fetch HTML content.
json
The response is a JavaScript object created by parsing the contents of received data as JSON.
text
The response is a text in a DOMString object.
ms-stream '
The response is part of a streaming download; this response type is only allowed for download requests, and is only supported by Internet Explorer.

Deprecated values

moz-chunked-arraybuffer '
A Firefox-only value which instructs XMLHttpRequest to deliver ArrayBuffer objects containing chunks of the incoming data. Accessing response during a progress event returns the data received so far. Outside the progress event handler, the value of response is always null. You shouldn't use this non-standard (and, as of Firefox 68, entirely removed) API; instead, consider using the Fetch API with readable streams, which offers a standard alternative to accessing the response in a streaming fashion.

Specifications

Specification Status Comment
XMLHttpRequest Unknown Live standard, latest version

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
responseType Chrome

Full support 31

Edge

Full support 12

Firefox

Full support 6

IE

Full support 10

Opera No support 12 — 15


No support 12 — 15


Full support 18


Safari

Full support 7

WebView Android

Full support 55

Chrome Android

Full support 55

Firefox Android

Full support 50

Opera Android

Full support 42

Safari iOS

Full support 7

Samsung Internet Android

Full support 6.0

arraybuffer Chrome

Full support 31

Edge

Full support 12

Firefox

Full support 6

IE

Full support 10

Opera No support 12 — 15


No support 12 — 15


Full support 18


Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 50

Opera Android

Full support Yes

Safari iOS

?

Samsung Internet Android

Full support Yes

blob Chrome

Full support 31

Edge

Full support 12

Firefox

Full support 6

IE

Full support 10

Opera

Full support 18

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 50

Opera Android

Full support Yes

Safari iOS

?

Samsung Internet Android

Full support Yes

document Chrome

Full support 31

Edge

Full support 12

Firefox

Full support 11

IE

Full support 10

Opera

No support No

Safari

Full support 7

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 50

Opera Android

Full support Yes

Safari iOS

?

Samsung Internet Android

Full support Yes

json Chrome

Full support 31

Edge

Full support 79

Firefox

Full support 10

IE

No support No

Opera No support 12 — 15


No support 12 — 15


Full support 18


Safari

Full support 7

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 50

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

moz-blob

Deprecated'Non-standard'

Chrome

No support No

Edge

No support No

Firefox

No support 12 — 58

IE

No support No

Opera

No support No

Safari

No support No

WebView Android

No support No

Chrome Android

No support No

Firefox Android

No support No

Opera Android

No support No

Safari iOS

No support No

Samsung Internet Android

No support No

moz-chunked-arraybuffer

Deprecated'Non-standard'

Chrome

No support No

Edge

No support No

Firefox

No support 14 — 68

IE

No support No

Opera

No support No

Safari

No support No

WebView Android

No support No

Chrome Android

No support No

Firefox Android

No support 50 — 68

Opera Android

No support No

Safari iOS

No support No

Samsung Internet Android

No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.'
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.'
Deprecated. Not for use in new websites.


See also