Based on all of the documentation I have read on CORS support in IE9/IE8, it seems quite clear that:
- You cannot initiate a CORS request in these browsers using
XMLHttpRequest
. You must use IE's proprietaryXDomainRequest
. XDomainRequest
does not support preflighting. My understanding of this limitation suggests that you can only send POST or GET CORS requests and these requests may only contain simple headers. Furthermore, there are other very odd limitations Microsoft has put on XDR requests, but that's not entirely important here.
So, what I have is a page at http://192.168.1.1:8080
. Using XMLHttpRequest
, I was attempting to send a DELETE request to http://192.168.1.1.9000
. I fully expected this to fail. I was just doing a sanity check before I re-thought the associated request to ensure that it would work for CORS requests once I switch to use of XDR. Again, I am using IE8 here.
var xhr = new XMLHttpRequest();
xhr.open("DELETE", "http://192.168.1.1:9000", true);
xhr.send();
Oddly enough, the request seemed to succeed. The DELETE action handler was hit on the server at port 9000. I returned a response, and I was able to access responseText
on the XHR object instance.
I can't imagine why this actually worked. It seems like it shouldn't have, unless I am missing something here. Does anyone have any ideas?