JSON is a file format, while AJAX is a JavaScript method for sending and receiving data from a web server after a page has finished loading. X is in AJAX for XML (also a file format), which is an alternative to JSON, but it is a little wrong because quite a few things that people call AJAX do not actually use XML at all.
Mr. LeyBaert's JSONP link is very useful in terms of practically explaining what is going on in the Twitter API; this is not XMLHTMLRequesting at all, there is just another script tag that points to the javascript file on the Twitter website, which then loads along with the rest of your page when the page first loads.
You can get neat things through this, but I donโt think you can do it after loading the page (as with AJAX), unless you start messing with hidden IFrames or the like. If you really need to get AJAX style elements without XMLHTTPRequests, what do you want to learn; dynamically adding an IFrame to a document that links to a page that requests a script (or the like) from another site. There is a discussion of the pros and cons of this here .
source share