AJAX
Web 2.0: a new version number from a single feature?
So it might seem. Sometime around 1999, the world went a little potty about a web browser feature introduced by Microsoft.
Essentially, this boils down to being able to communicate with the web server without refreshing the page.
This can really speed up the apparent speed of a system. For example, if it's unlikely that a deletion will fail, an application may visually remove the item to be deleted and perform the deletion behind-the-scenes while the user does other things.
Examples
Without AJAX and the associated 'fudges' mentioned on this page, we wouldn't have the nippy interfaces that come with:
- GMail
- Google Maps
- Almost any other web application
Bad name
Asynchronous JavaScript and XML is a bit of a misnomer nowadays, as it's generally considered cooler to use JSON in place of XML.
JSON has a more concise syntax than XML, but lacks features such as namespacing.
Fudges
There are several techniques for 'faking' AJAX on older browsers that do not support the XMLHttpRequest function. Perhaps the most popular of these is the use of a hidden <iframe> element that has the capability of loading different pages whilst still being communicable with the originating page.
Security
A built-in security feature of web browsers means that only the server that provided a web page may be contacted with AJAX. This is the so-called 'same origin policy'.
One workaround to this restriction is JSON-P.