JavaScript Fetching External Data

Up until this point, we have been stuck with mostly static data that was loaded when the page loaded. But for a lot of use cases it is important that we can get updated data from a server on demand and also be able to insert, update or delete data to the server.

Imagine an online collaborative document editor like Google Docs where the whole page would have to reload after each key stroke. Or a messaging web site where you would have to reload the entire page each time you sent something, and manually having to reload the page if you wanted to see new replies. Quite impractical, isn't it?

That was pretty much the state of online interactive web sites until 1998 when Microsoft introduced XMLHttpRequest in their web browser. XMLHttpRequest allowed web site scripts to receive and send data to servers without triggering a complete page reload. A cross browser standard for XMLHttpRequest was released in 2006 by the W3C.


Asynchronous JavaScript and XML

AJAX is a set of web developement techniques that combine many other web technologies in order to create truly asynchronous applications.