Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

AJAX (Asynchronous JavaScript and XML) is a technique for creating seamless interactive websites via asynchronous data exchange between client and server. AJAX facilitates communication with the server or partial page updates without a traditional page refresh.


AJAX stands for Asynchronous and .

While not a technology in itself, AJAX is a term coined in 2005 by Jesse James Garrett, that describes a "new" approach to using a number of existing technologies together, including: HTML/XHTML, CSS, JavaScript, the DOM, XML, XSLT, and most importantly the XMLHttpRequest object. AJAX uses the XMLHttpRequest (abbreviated XHR) API to manage HTTP requests from inside the code.

When these technologies are combined in the AJAX model, web applications are able to make quick, incremental updates to the user interface without reloading the entire browser page. This makes the application faster and more responsive to user actions.

This communication is performed by code in the browser. Originally, it was anticipated that the data would be encoded in form, hence the acronym AJAX. However the term is now used for all browser/server interaction of this type, even when XML is not used.

Although the X in AJAX stands for XML, JSON (JavaScript Object Notation) is used more than XML nowadays because of its many advantages, including the availability of native methods to handle it, its lightness (compared to XML) and also being a strict subset of JavaScript. Both JSON and XML can be used for packaging information in the AJAX model.

XMLHttpRequest is the main method of interacting between the and the ; it is supported by all modern browsers. Early versions of Internet Explorer (IE 5 and 6) don't support the native XHR API, although they do support an ActiveX API which has most of the capabilities of XHR (an example of this is new ActiveXObject("MSXML2.XMLHTTP.3.0")).

Useful links:

history | excerpt history