jQuery AJAX request failing in IE

前端 未结 8 1262
[愿得一人]
[愿得一人] 2020-11-30 03:42

The following AJAX call is failing in IE.

$.ajax({
    url:\"{{SITE_URL}}/content/twitter.json\",
    dataType:\"json\",
    error:function(xhr, status, erro         


        
8条回答
  •  攒了一身酷
    2020-11-30 04:30

    Fixed, I changed the content-type from application/json; charset=utf8 to just plain application/json.
    I hate IE :)

    Also to avoid IE super-caching try this:

    var d = new Date();
    $.ajax({
            url:"{{SITE_URL}}/content/twitter.json?_="+d.getTime(), 
    ...Snip...
    

    That way each request is a new url for IE to get :D

提交回复
热议问题