- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
The downside is that it requires the provider of the API to support JSONP.
Flash can access cross-domain contents as long as the target website has a
The downside is that it requires Flash in the user's browser and that the website you get data from must have a crossdomain.xml that allows cross-domains requests.
Server-side script on the same domain name
Server-side languages like PHP have no BS same-domain restrictions, so you could have a script that acts as proxy (e.g. download via one of the http extension like cURL).
The downside is that all requests have to go thru your server, so that increases the load on your server.
However the benefit is that it would work with any ressource as it doesn't require the target to support crossdomain or jsonp. So if nothing else works, this would.
Solutions specific to some browsers
Internet Explorer has Cross Domain Request
Firefox 3.5+ has the cross-origin sharing standard, but it requires the ressource you're trying to access to include special headers, e.g. in PHP:
A few other major browsers support this too, so if you don't need to support old browsers and if you can get the ressources you're trying to access to send those headers, this may be your best bet, otherwise the server-side script would be my recommendation.
Firefox also has a user setting