$.getJSON(url, function(data) {
console.log(data)
}
This code returns undefined for IE9 but is the proper data for IE11, firefox, and chrome. I tried changing it to use $.ajax as well thinking to use the error handler but it never goes there. It returns success. It's just that the data returned is considered undefined.
I've tried cache: false, I've tried removing charset=utf-8 from the content-type. (backend is springMVC). The json being returned is returned programatically so it shouldn't be malformed.
This is quite annoying.
The question is almost exactly the same as: $.getJSON returning undefined to success callback in IE9 and below
But the accepted answer to that still didn't seem to figure out the root of the issue. There are a bunch more similar ones as well but none have a good answer.