0
$.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.

Community
  • 1
  • 1
user2483724
  • 2,089
  • 5
  • 27
  • 43
  • When you use ajax what the is the data that is returned? Is it valid Json? – Chandu Apr 29 '14 at 21:50
  • Yes, it's read and used correctly by all other browsers. I copy pasted it from the network tab and ran it through a linter as well. – user2483724 Apr 29 '14 at 21:53

0 Answers0