【问题标题】:jQuery AJAX issue IE8jQuery AJAX 问题 IE8
【发布时间】:2012-07-09 13:55:06
【问题描述】:

我的以下代码可以在除 IE8 之外的所有主要浏览器中完美运行。

    $.ajax({
        type: 'GET',
        url: 'https://APPSECRET:APPKEY@my.site.com/admin/products.json',
        cache: false, 
        timeout: 15000,
        success: function(jsonp, status, XMLHttpReq){
            callback(jsonp);
        },
        error: function(){
            alert('Error');
        },
        dataType: 'jsonp'
    });

当我在 IE 8 中运行它时,会触发错误功能并收到警报。我在这里查找了其他解决方案,甚至将缓存设置为 false 仍然不起作用。有什么建议吗?

【问题讨论】:

    标签: jquery internet-explorer-8


    【解决方案1】:
    $.ajaxSetup({ cache: false });
    

    $.ajax({
      cache: false,
      //other options...
    });
    

    将时间戳附加到查询字符串

    我认为这个问题与https://stackoverflow.com/a/4303862/169469重复

    【讨论】:

      猜你喜欢
      • 2013-01-10
      • 1970-01-01
      • 2012-06-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多