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.


An empty responseType string is treated the same as "text", the default type.
The response is a JavaScript ArrayBuffer containing binary data.
The response is a Blob object containing the binary data.
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.
The response is a JavaScript object created by parsing the contents of received data as JSON.
The response is a text in a DOMString object.
ms-stream This API has not been standardized.
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 This API has not been standardized.

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.


Specification Status Comment
XMLHttpRequest Unknown Live standard, latest version

Browser compatibility

BCD tables only load in the browser

See also