jQuery AJAX request failing in IE

前端 未结 8 1281
[愿得一人]
[愿得一人] 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:35

    In newer versions of internet explorer (IE7) it is necessary to write the next line before calling $.ajax, otherwise it would never call the function:

    $.ajaxSetup({ cache: false }); //this line before $.ajax!!!
    $.ajax({
        //codes
        //codes
        //codes
    });
    

提交回复
热议问题