Access control for cross site requests in Internet Explorer

后端 未结 6 2398
谎友^
谎友^ 2020-12-28 21:20

I am trying to make an AJAX call from several domains to a single one which will handle the request. Enabling Cross domain in Firefox and Chrome was easy by setting the head

6条回答
  •  庸人自扰
    2020-12-28 22:01

    Just adding to the Eric's answer , for Older version of IE , you can use Jquery 1.4.2's $.ajax method , that by default allows the cross domain requests, or for cross domain JSON , you can use

    jQuery.getJSON( String url, Map data, Function callback ) returns XMLHttpRequest

    An Excerpt from Jquery docs.

    "jQuery now supports JSONP natively - if you attempt to load JSON (via $.getJSON or $.ajax) from a remote URL then an extra callback will be provided for the server to interpret."

提交回复
热议问题