I have a site at myapp.myurl.com
that is making an ajax request to api.myurl.com
. I understand that this is considered "cross-domain." What I don't understand is why the ajax call works in every browser except IE8 and IE9.
Here's the code with details removed.
$.ajax({
type: "POST",
dataType: "json",
headers: header,
data: data,
url: "api.myurl.com/getdata",
success: function (data) {
//dostuff
}
});
Is there anything I can do?
Here's the response when I run the script manually in IE8
{readyState: 0, responseJSON: undefined, status: 0, statusText: "No Transport"}
Here's the response when I run the script manually in Chrome
Object {readyState: 1, getResponseHeader: function, getAllResponseHeaders: function, setRequestHeader: function, overrideMimeType: function…}
And it has the correct JSON response.