Cross-origin Ajax requests don't work in Opera and IE9?

前端 未结 3 1432
野趣味
野趣味 2020-12-11 01:52

I am using this page - http://ecmazing.com/cors.html - to make a cross-origin Ajax request to this resource: http://hacheck.tel.fer.hr/xml.pl

It works in Chrome, Saf

相关标签:
3条回答
  • 2020-12-11 02:12

    See the entry for cors at whencaniuse.

    For Internet Explorer CORS is "Supported somewhat in IE8 and IE9 using the XDomainRequest object", so you need to use an alternate object to use it.

    Opera simply doesn't support it.

    If you need cross-domain Ajax in Opera, then use JSON-P.

    0 讨论(0)
  • 2020-12-11 02:15

    I got so frustrated trying to use CORS with IE and jQuery, I wrote a library to smooth over the worst parts.

    Yeah, Microsoft's shortage of cash and manpower have kept them from making their browsers properly CORS-compliant in the seven short years they've had to do it in, but I still prefer CORS to JSONP, which, frankly, is a hack.

    0 讨论(0)
  • 2020-12-11 02:26

    Here is a solution that works for IE.

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