XmlHttpRequest status 0 instead of 401 in IE 10
I have hit a wall with this issue. I guess it is some kind of IE bug but I want to be sure. So the question is. Why does IE10 XmlHttpRequest.status returns 0 instead of 401? var xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { document.getElementById("rescode").innerHTML="Request completed with status: "+xmlhttp.status; } } xmlhttp.open("GET","http://hosting.gregy.cz/cors/",true); xmlhttp.send(); See plunker here: http://plnkr.co/edit/E2lCflPDHHaQi7t79IeM?p=preview This code fires a CORS request which always returns 401. Firefox and chrome