', cache: false, success: function(data, textStatu...">

JQuery ajax not working on ie8

I have this call:

$.ajax({dataType: "json",
        url: '<url_here>',
        cache: false,
        success: function(data, textStatus, jqXHR ) {
            success(data, textStatus, jqXHR);
        }
});

      

This works in every browser out there ... except IE :( (I'm testing version 8) The success function is never called so that the function (.ajax) doesn't execute correctly (or at all). Does anyone know anything about jquery ajax , i.e. 8?

+3


source to share


2 answers


OK, it's always good, where is one answer for yourself :)

The problem was that it looks like IE doesn't parse headers from the ajax'ed site. Since this was a cross domain request, it let it go through. So I had to activate "Access to data sources in the domain" in IE security settings. In other browsers, simply adding the Access-Control-Allow-Origin: * header will allow cross-site scripting rather than IE.



Another thing I had to add to the script was: jQuery.support.cors = true;

or I would get "No transport"

+4


source


This is because IE8 does not support JSON by default. You have to include json2 in your project.



0


source







All Articles