Crossdomain.xml和iPad [英] Crossdomain.xml and iPad

查看:173
本文介绍了Crossdomain.xml和iPad的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,跨域XHR的crossdomain.xml文件技术是基于Flash的。在服务器上的这个设置允许来自客户端的Javascript代码(使用flash)绕过同源策略。



我想知道这种技术是否不再适用iPad设备(因为他们不支持Flash)。这是否也意味着所有这些Web混搭使用这种技术从客户端的浏览器访问数据不工作?
$ b

道歉,如果我假设错误。

解决方案

没有这样的事情使用 crossdomain.xml 文件来制作跨域AJAX请求。



通过在服务器上设置允许客户端跨域使用数据的HTTP标头来执行CDAJAX。在W3档案中看到这个消息:

http://lists.w3.org/Archives/Public/public-webapi/2006Jun/0012



另外,看在为Firefox添加此功能的补丁:



https://bugzilla.mozilla.org/show_bug.cgi?id=389508



使用YQL调用域名:

http://ajaxian.com/archives/using-yql-as-a-proxy-for-cross-domain-ajax



希望这会有帮助!



编辑:

http://www.w3.org/TR/access-control/

As far as I understand, the crossdomain.xml file technique for crossdomain XHR is based on Flash. This settings on the server allows Javascript code from the client (using flash) to bypass the Same Origin Policy.

I was wondering if that technique doesn't work any more in iPad devices (since they don't support Flash). Does this also imply that all those Web Mashups that are using this technique to access data from the client's browser doesn't work at all?

Apologize if I'm assuming something wrong.

解决方案

There is no such thing as using a crossdomain.xml file for making cross-domain AJAX requests.

CDAJAX is performed by setting HTTP headers on the server which allow the client to consume data cross-domain. See this message in the W3 archives:

http://lists.w3.org/Archives/Public/public-webapi/2006Jun/0012

Also, look at the patch that adds this functionality to Firefox:

https://bugzilla.mozilla.org/show_bug.cgi?id=389508

Your best bet would be to perform cross-domain calls using YQL:

http://ajaxian.com/archives/using-yql-as-a-proxy-for-cross-domain-ajax

Hope this helps!

EDIT:

Also, http://www.w3.org/TR/access-control/

这篇关于Crossdomain.xml和iPad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆