We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

The XMLHttpRequest method open() initializes a newly-created request, or re-initializes an existing one.

Note: Calling this method for an already active request (one for which open() has already been called) is the equivalent of calling abort().


XMLHttpRequest.open(method, url)
XMLHttpRequest.open(method, url, async)
XMLHttpRequest.open(method, url, async, user)
XMLHttpRequest.open(method, url, async, user, password)


The HTTP request method to use, such as "GET", "POST", "PUT", "DELETE", etc. Ignored for non-HTTP(S) URLs.
A DOMString representing the URL to send the request to.
async Optional
An optional Boolean parameter, defaulting to true, indicating whether or not to perform the operation asynchronously. If this value is false, the send() method does not return until the response is received. If true, notification of a completed transaction is provided using event listeners. This must be true if the multipart attribute is true, or an exception will be thrown.
Note: Synchronous requests on the main thread can be easily disruptive to the user experience and should be avoided; in fact, many browsers have deprecated synchronous XHR support on the main thread entirely. Synchronous requests are permitted in Worker)s.
user Optional
The optional user name to use for authentication purposes; by default, this is the null value.
password Optional
The optional password to use for authentication purposes; by default, this is the null value.


Specification Status Comment
The definition of 'open()' in that specification.
Living Standard WHATWG living standard

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support1 Yes Yes



FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes1 Yes Yes Yes Yes ?

1. Implemented via ActiveXObject

See also

Document Tags and Contributors

 Contributors to this page: Sheppy, ExE_Boss, wbamberg, Makyen, erikadoyle, teoli, Majr, nadih, MashKao, jsx
 Last updated by: Sheppy,