alexandru edited this page Apr 13, 2012 · 7 revisions

Some people reported that it doesn't work in IExplorer 8/9. After doing some more testing I quickly came to the conclusion that this is because XDomainRequest simply sucks the life out of you with (1) too many restrictions + (2) no way of debugging whatever happened.

Here's the MSDN page describing current issues with XDomainRequest:

XDomainRequest Restrictions, Limitations and Workarounds

Summarized in the context of our use-case, when doing requests using this utility / debugging / testing it, do the following:

  • IExplorer does not accept a wildcard for Access-Control-Allow-Origin
  • related to the item above, IExplorer sometimes is configured (or is blocked by a firewall) to NOT send the HTTP Referer. So do NOT base your server-side implementation on it to emulate wildcards
  • do not try to send custom headers, IExplorer will ignore them ... so NO
  • do not try to send cookies, IExplorer will strip them out and sending cookies is problematic in GENERAL, unless withCredentials is involved
  • withCredentials is not supported by IExplorer and it is weird anyway - pass everything needed to the server using www-urlencoded requests and set cookies on the client with your own Javascript code, based on whatever comes from the response's body
  • fresh installs of IExplorer 6 and 7 do not have Flash 9 installed, so flXHR will not work
  • in IExplorer 8 (at least originally, I don't know if it wasn't updated), the only Content-Type supported for your request is text/plain. This means the server may not receive a Content-Type: www-urlencoded header in the request and may assume it must not parse it, so do tests and be prepared to parse the request yourself. So do not rely on multipart/form-data to work either. Yes I know, this sucks.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.