tags:

views:

73

answers:

3

What can be done to access remote domain most easily to read data with XML HTTP REQUEST?

+1  A: 

Due to security restrictions (see the "Same Domain Policy") it's not possible to make cross-domain requests. Depending on what you need I'd suggest either a custom proxy, an already-existing proxy (e.g. YQL), or JSONP.

J-P
The good news is that this is now being addressed by the W3C and we can expect recommendations to make their way into browsers fairly quickly; in fact, Firefox 3.5 and Safari 4 already implement the new CORS mechanism:http://www.w3.org/TR/access-control/
T.J. Crowder
A: 

The third option is to get them to enable CSSHTTPRequest.

Marius
A: 

If you need to use an XHTMLHttpRequest, make sure the resource being requested sends back an appropriate Access-Control header. Currently, this will only work in Firefox 3.5 and higher.

Eli Grey