HTML5 Ajax for another domain?

I recently met http://chromeexperiments.com/ . I found there several projects that are quite intriguing: 100 tweets and twitterbrowse (I would post links to them, but I'm not yet allowed). Both of these work fine for me on Firefox 3.5 under Ubuntu 9.04. What I find particularly peculiar is the fact that these two "experiments" seem to issue Ajax requests to other domains than the ones on which they are hosted (more precisely, on twitter.com). I tried the same on an HTML5 page (using <!DOCTYPE html> ), but I can't get it to work.

I use MooTools to create requests, but this should not be a problem, it is still Ajax, right?

Any idea how these sites do this?

+6
html5 ajax
source share
3 answers

Take a look at http://snook.ca/archives/javascript/cross_domain_aj/

I personally was able to do this using the JSON method in my personal project, where I needed to get an ajax response from another domain server.

+4
source share

The XMLHttpRequest 2 layer enables cross-domain AJAX. Read more about it here .

+5
source share

They do not use HTML5 to request ajax, they use JSONP , which is essentially a recipient for JSON, but can be done through any domain

+1
source share

All Articles