I'm trying to retrieve an XML from a cross-domain server via the ajax jQuery's method and the following error message appears on the console:
DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load: 'http://foreign.domain/...'
The code that brings this error is:
var temp = $.ajax({
url : url,
async : false
dataType : "xml",
success : function(xml) {
// irrelevant for the case
},
error : function(xhr, textStatus, error) {
console.warn('An error occured while loading the following URL: "%s". Error message: %s', url, error);
}
});
The problem is the synchronous option specified by:
This seems not to work in Chrome probably because of the specification of the jQuery's ajax method, which says:
The strange of the situation is that Firefox and Internet Explorer seem to ignore that specification and they both perform the http request and return the XML result.