Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
HTML and CSS
Objects
 XDomainRequest Object
XDomainRequest Object
New for Windows Internet Explorer 8
Note: This documentation is preliminary and is subject to change.

Represents a cross-domain XML request via HTTP.

Members Table

The following table lists the members exposed by the XDomainRequest object.

Attributes/Properties
Show:
PropertyDescription
constructor Returns a references to the constructor of an object.
responseText Contains the body of the response returned by the server.
timeout Gets or sets the value of the timeout property.
EventDescription
onerror Raised when there is an error that prevents the completion of the cross-domain request.
onload Raised when the object has been completely received from the server.
onprogress Raised when the browser starts receiving data from the server.
ontimeout Raised when there is an error that prevents the completion of the request.
MethodDescription
abort The abort method terminates a pending send.
open Creates a connection with a domain's server.
send Transmits a data string to the server for processing.

Remarks

The XDomainRequest object is a safe, reliable, and lightweight data service, that allows script on any page to anonymously connect to any server and exchange data. Developers can use the XDomainRequest object when cross-site security is not an issue.

The window object provides an XDomainRequest property that can be used to instantiate a new cross-domain request.

Example

 var oXdr = new XDomainRequest; 

Standards Information

There is no public standard that applies to this object.

See Also

XMLHttpRequest
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Why another API?      John Sudds - MSFT   |   Edit   |  

If you're wondering why we need another object to initiate server requests, you're not alone. The XDomainRequest object has been designed to be simpler and more secure than XMLHttpRequest in cross-domain scenarios. Read more about it in the newly released IE8 Whitepaper from the IE team.

http://code.msdn.microsoft.com/xdsecuritywp

Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker