By fiddling it seems IE11 does not make an ajax request if it is cross origin. FF and Chrome will at least make the request and throw an error if the resource API is not sending necessary headers. The resource API (Web API 2.0) in my case is adding required headers which will be helpful IF IE makes the request, but it doesn't.
Client's JavaScript:
jQuery.support.cors =true;
$.fn.somePlugin =function(){
$.ajax({
url: apiUrl +'/articles/list/',
type:'GET',
crossDomain:true}).done(function(data, textStatus, xhr){
console.log('hello world!');});returnthis;}
The ajax request above works perfectly in Chrome and FF but not in IE11.
I've tried:
- adding a reference to XDomainRequest.js without any effect.
- enabling cross origin request in IE Security options - even though it seems bizarre to do this on every client machine. Regardless, it made no difference.