Safari 上的 JSONP 错误

JSONP error on Safari

以下 JSONP JQuery (v1.10.2) 调用适用于除 Safari 以外的所有浏览器:-

    $.ajax({
    cache: false,
    type: 'GET',
    url: userExistsUrl,
    dataType: 'json',
    error: function (jqXHR, textStatus, errorThrown) {
        var errText = 'We are not able to process your request at the moment (' + textStatus + ', ' + errorThrown + ')';
        console.error('HTTP response : ' + jqXHR.status);
        console.error(errText);
        displayError(errText);
    },
    success: function (xml) { }
});

在 Safari 上调用错误函数并且变量 textStatus 包含字符串 "error"。但是,如果我 select 开发人员菜单选项 'Disable cross-origin restrictions' 调用有效。

由于这只是一个标准的 JSONP 调用,我如何才能在不调用开发人员选项的情况下使其在 Safari 上运行?

你的数据类型错误

数据类型:'jsonp'