简体   繁体   中英

Cross-Origin Resource Sharing for Opera

Has anybody found a workaround for Opera regarding Cross-Origin Resource Sharing?

I want to make a cross domain XmlHttpRequest to my domain foo.com from my script placed on bar.com.

The standard so far is not implemented by Opera.

Examples and documentation on how to do this on other browsers can be found here

As far as I tested, you can do this on Firefox, IE, Safari and Chrome. But not on Opera.

如果浏览器不支持真正的CORS,JSONP是获得基本CORS功能的最佳/唯一方式(仅GET,因为它在内部使用<script>标记)。

可能的替代方法是使用JSONP进行跨域请求。

Opera has not implemented CORS yet. It is actively worked on but we do not have a release date yet.

Update 2012-07-26 : As of today and since the release of Opera 12. Opera has a stable implementation of CORS . Note that Opera Mini is not yet implementing CORS.

The latest version of Opera's rendering engine, Presto 2.10, now supports CORS.

  • Enabled Cross-Origin Resource Sharing (CORS) for XMLHttpRequest. (Presto/2.10.232)

But a desktop version of Opera has not yet been released with this version of the rendering engine. So far only one version of Opera seems to have the CORS support, Mobile 12.

Here's an excerpt from the February 27, 2012 update to their "Web specifications support in Opera products" page:

Miscellaneous

Item | D11.60 | D11.50 | SDK 3.2 | SDK3.1 | M12 | M11.5 | M11.1 | M11 | Mini6.5
-----+--------+--------+---------+--------+-----+-------+-------+-----+--------
CORS | No     | No     | No      | No     | Yes | No    | No    | No  | No

D =desktop SDK =device SDK M =mobile Mini =Mini (-:

And now that table has been updated again since version 12 for the desktop has been released finally with CORS support:

Item | D12.00 | D11.60 | D11.50 | SDK 3.2 | SDK3.1 | M12 | M11.5 | M11.1 | M11 | Mini6.5
-----+--------+--------+--------+---------+--------+-----+-------+-------+-----+--------
CORS | Yes    | No     | No     | Yes     | Yes    | No  | Yes   | No    | No  | No

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM