DOMException: Failed to execute 'send' on 'XMLHttpRequest' on Chrome only

前端 未结 1 1136
盖世英雄少女心
盖世英雄少女心 2021-01-07 15:04

I\'m trying to retrieve an XML from a cross-domain server via the ajax jQuery\'s method and the following error message appears on the console:

相关标签:
1条回答
  • 2021-01-07 15:54

    The problem is the synchronous option specified by:

    async: false,
    

    This seems not to work in Chrome probably because of the specification of the jQuery's ajax method, which says:

    Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation.

    The strange of the situation is that Firefox and Internet Explorer seem to ignore that specification and they both perform the http request and return the XML result.

    0 讨论(0)
提交回复
热议问题