views:

27

answers:

1

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.

A: 

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/

mattbasta
Thank you for your comments mattbasta.however, I'm a bit more confuse now than before. ;)this technique for cd-xhr is described here:http://jimbojw.com/wiki/index.php?title=Cross-domain_Ajax_via_Flashand even facebook is using it as we can see here:http://wiki.developers.facebook.com/index.php/FBJS_LocalProxyfinally, afaik, that proposal of the w3c with headers is only implemented in Firefox 3.5 (and up):https://developer.mozilla.org/En/HTTP_access_controlRegarding YQL, seems nice, that's pretty much a server-proxy solution. I was considering a client-based solution on the iPad.
Cristobal Viedma
@Cristobal: The document that you're referring to takes advantage of Flash to perform the request; it is not a native browser feature. Perhaps I misunderstood your question.
mattbasta
@Cristobal: I should clarify: since the articles you've mentioned use Flash, you cannot make them work on Apple mobile products (since they do not support Flash). You must use another technique.
mattbasta