Cross-Origin Resource Sharing for Opera

那年仲夏 提交于 2019-12-08 03:56:43

问题


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.


回答1:


Possible alternative is to use JSONP for cross domain requests.




回答2:


JSONP is the best/only way to get basic CORS functionality (only GET, as it uses a <script> tag internally) if the browser doesn't support real CORS.




回答3:


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



回答4:


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.



来源:https://stackoverflow.com/questions/5572331/cross-origin-resource-sharing-for-opera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!