written by cail • posted in How-To • 683 views no comments

It is very sad!
Below is my code. The server has " Access-Control-Allow-Origin: * " in its head.

var xdr = new XDomainRequest();
if (xdr) {
  xdr.open('get', url);
  xdr.onload = function () {
    var xml = $.parseXML(xdr.responseText);
    do_something_with(xml);
  };
  xdr.onerror = function () { alert('bug in IE: fail to load'); }
  xdr.ontimeout = function () { alert('bug in IE: time out'); }
  xdr.send();
} else {
  alert('bug in IE: fail to start');
}

Previous:
Next:

Leave a Reply

QR code of this post

blog by cail