Opera 跨源资源共享
有人找到了 Opera 关于跨源资源共享的解决方法吗?
我想从放置在 bar.com 上的脚本向我的域 foo.com 创建一个跨域 XmlHttpRequest
。
到目前为止,Opera 尚未实现标准。
有关如何在其他浏览器上执行此操作的示例和文档,请参见 。
据我测试,您可以在 Firefox、IE、Safari 和 Chrome 上执行此操作 但在 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
可能的替代方案是使用 JSONP 进行跨域请求。
Possible alternative is to use JSONP for cross domain requests.
如果浏览器不支持真正的 CORS,则 JSONP 是获取基本 CORS 功能的最佳/唯一方法(仅 GET,因为它内部使用
标记)。
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.最新版本的 Opera 渲染引擎 Presto 2.10 现在支持 CORS。< /a>
但是使用此版本渲染引擎的 Opera 桌面版本尚未发布。到目前为止,似乎只有一个版本的 Opera 支持 CORS,即 Mobile 12。
以下是 2012 年 2 月 27 日更新的摘录 “Opera 产品中的 Web 规范支持” 页面:
D=desktop SDK=device SDK M =mobile Mini=Mini (-:
现在,自从桌面版本 12 终于发布并支持 CORS 以来,该表已再次更新:
The latest version of Opera's rendering engine, Presto 2.10, now supports CORS.
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:
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:
Opera 尚未实施 CORS。它正在积极开发中,但我们还没有发布日期。
更新 2012-07-26:从今天开始,自 Opera 12 发布以来。Opera 拥有稳定的 CORS 的实现。请注意,Opera Mini 尚未实施 CORS。
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.