★ wanayoo — archive 1999 https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequestNouvelle recherche | Portail wanayoo

Creation of new accounts on MDN is unavailable while we devise a solution to an ongoing denial-of-service attack. We're sorry about the inconvenience! If you see something that needs to be fixed, please file a bug: https://bugzilla.mozilla.org/form.doc

XMLHttpRequest()

Draft
This page is not complete.

The XMLHttpRequest() constructor initiates an XMLHttpRequest. It must be called before any other method calls.

Gecko/Firefox 16 adds a non-standard parameter to the constructor that can enable anonymous mode (see bug 692677). Setting the mozAnon flag to true effectively resembles the AnonXMLHttpRequest() constructor described in the XMLHttpRequest specification which has not been implemented in any browser yet (as of September 2012).

XMLHttpRequest (
  JSObject objParameters
);
Parameters (non-standard)
objParameters
There are two flags you can set:
mozAnon
Boolean: Setting this flag to true will cause the browser not to expose the origin and user credentials when fetching resources. Most important, this means that cookies will not be sent unless explicitly added using setRequestHeader.
mozSystem
Boolean: Setting this flag to true allows making cross-site connections without requiring the server to opt-in using CORS. Requires setting mozAnon: true, i.e. this can't be combined with sending cookies or other user credentials. This only works in privileged (reviewed) apps; it does not work on arbitrary webpages loaded in Firefox.

Document Tags and Contributors

 Contributors to this page: jsx
 Last updated by: jsx,