Ajax is not a new language or technology, it is actually a combination of several technologies in a certain way to play their role in the same collaboration, it includes
Standardized rendering using XHTML and CSS;
Use DOM to implement dynamic display and interaction;
Data exchange and processing using XML and XSLT;
Using XMLHttpRequest for asynchronous data reading;
In the old interaction, the user triggers an HTTP request to the server, the server processes it, returns a new HTHL page to the client, and every time the server processes a client-submitted request, the client can only wait, and even if it is only a small interaction, By simply getting a very simple piece of data from the server, you return a full HTML page, and the user wastes time and bandwidth each time to reread the entire page.
With Ajax, the user will quickly respond to the wait without the page overload from feeling almost all the operations.
Ajax works by adding a middle tier between the user and the server, enabling the user to respond asynchronously to the server. Not all user requests are submitted to the server, such as data validation and processing, which are given to the Ajax engine itself, and the Ajax engine submits requests to the server (mainly reading XML-formatted data) when it is necessary to read new data from the server.
And one of the biggest features of Ajax is that it is possible to transfer or read data to the server without refreshing the page (also known as no Refresh Update page), which mainly benefits from the XMLHTTP component XMLHttpRequest object. This can be sent to the desktop application only with the server data level exchange, and do not refresh the interface every time without each time the data processing to the server to do, which is to reduce the burden of the server and accelerate the response speed, shorten the user waiting time.
The first application XMLHTTP is Microsoft, ie by allowing developers to use XMLHTTP ActiveX components within a Web page to extend their functionality, developers can transfer data directly to or from the server without navigating from the current Web page. This feature is important because it helps to reduce the pain of stateless connections, and it also eliminates the need to download redundant HTML, thereby increasing the speed of the process. Mozilla responds by creating its own inherited XML proxy class: the XMLHttpRequest class. Konqueror (and Safari v1.2, also a khtml based browser) also supports XMLHttpRequest objects, and opera also supports v7.6x+ objects in later versions of XMLHttpRequest. For most cases, XMLHttpRequest objects are similar to XMLHTTP components, and methods and properties are similar, except that a small subset of properties are not supported.
The application of XMLHttpRequest object in JS
var xmlhttp = new XMLHttpRequest ();
The application of Microsoft's XMLHTTP component in JS
var xmlhttp = new ActiveXObject (microsoft.xmlhttp);
var xmlhttp = new ActiveXObject (msxml2.xmlhttp);