I'm having trouble getting data from a JSON feed in IE.
Here's the test. It alerts in FF, Chrome, Safari, but not IE:
function do_something(data){
alert(data);
}
$(document).ready(function() {
$.getJSON('https://www.mec.ca/api/v1/stores/1', do_something);
});
And here's the fiddle: http://jsfiddle.net/upksp/
I have tried the following solutions to seemingly-related questions with no luck:
- Use
$.ajax()
instead of$.getJSON()
: $.getJSON not workin in IE - Append
&callback=?
: $.getJson not working in IE
I can't help but think it may be a problem with the headers, but don't know enough about them to diagnose. I've successfully used JSONP on the same page with no issues, and I don't see any conflicts. Help!
Note: For the code I'm working on, the API will be on the same domain(1) as the script that is requesting it. However for testing, they will have different subdomains(2) such as www.domain.com vs environment.domain.com. I assume (2) will be problematic, but (1) will work fine?