6

In my application, we use the XDR objects (XDomainRequest for IE8 to IE10 and EventSource for other browsers) to open a sticky connection to the server.

However, IE11 doesn't implement the XDomainRequest anymore.

What should I use for IE11? XMLHttpRequest 2?

Rafael Maiolla
  • 373
  • 1
  • 3
  • 13

1 Answers1

3

According to MSDN's Compatibility changes in IE11:

The XDomainRequest object is replaced by CORS for XMLHttpRequest.

narduw
  • 40
  • 1
  • 5
Olly Hodgson
  • 15,076
  • 3
  • 40
  • 60
  • @RafaelMaiolla Additionally there's a few EventSource polyfills floating around, they might be worth a look? https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills#eventsource – Olly Hodgson Dec 11 '13 at 17:28
  • 1
    This sample is a "GET" sample, what if you absolutely have to POST something? From what i can see so far, IE11 strips the BODY of the POST content so only the headers. – Conrad de Wet Jun 26 '14 at 12:32
  • @ConraddeWet Is it because you need a valid P3P Policy on your server? See http://stackoverflow.com/a/21682899/13019 – Olly Hodgson Jun 27 '14 at 08:00