What Is AJAX?
AJAX is called "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML). It is a Web page development technology used to create interactive web applications. It organically includes the following technologies:
Ajax (Asynchronous JavaScript + XML) Definition: representation based on the web Standard (standards-based presentation) XHTML + CSS; Dynamic Display and Interaction Using the DOM (Document Object Model; use XML and XSLT for data exchange and related operations; Use XMLHttpRequest for asynchronous data query and retrieval; use JavaScript to bind everything together.
Similar to DHTML or LAMP, AJAX does not refer to a single technology, but organically utilizes a series of related technologies. In fact, some AJAX-based "derived/synthesized" (derivative/composite) technologies are emerging, such as "AFLAX ".
AJAX applications use web browsers that support the above technologies as the operating platform. These browsers currently include Mozilla, Firefox, Internet Explorer, Opera, Konqueror, and Safari. However, Opera does not support XSL format objects or XSLT.
Core of Ajax technology
The core of Ajax is JavaScript, XMLHTTPRequest, and DOM. If the data format is XML, XML can be added. (The data returned by Ajax from the server can be XML, it can also be text or other formats ).
In the old interaction mode, the user triggers an HTTP request to the server. After the server processes the request, it returns a new HTHL page to the client, each time the server processes a request submitted by the client, the client can only wait idle, and even if it is only a small interaction, it only needs to get a simple data from the server, you must return a complete HTML page, and each time you have to waste time and bandwidth to re-read the entire page.
After Ajax is used, users feel that almost all operations will quickly respond to the waiting without page overloading (white screen.
1. XMLHTTPRequest
One of the biggest features of Ajax is that data can be transmitted to or read/written to the server without refreshing the page. This feature is mainly due to the XMLHTTPRequest object of the XMLHTTP component. In this way, the desktop application can only exchange data with the server, without refreshing the interface every time or submitting data processing to the server, in this way, the server load is reduced, the response speed is accelerated, and the user waiting time is shortened.
Microsoft was the first to apply XMLHTTP. IE (IE5 or above) allowed developers to use the XMLHTTP ActiveX component to expand their functions on the Web page, developers can directly transfer data to the server or retrieve data from the server without having to navigate the current Web page. This function is very important because it helps reduce the pain of stateless connections. It can also eliminate the need to download redundant HTML, thus improving the process speed. Mozilla (Mozilla1.0 or later and NetScape7 or later) responds by creating its own inherited XML proxy class: XMLHttpRequest class. Konqueror (similar to Safari v1.2 and KHTML-based browsers) also supports XMLHttpRequest objects, while Opera will also support XMLHttpRequest objects in Versions later than v7.6x +. In most cases, the XMLHttpRequest object is similar to the XMLHTTP component, and the methods and attributes are similar, but a small part of the attributes are not supported.
2. JavaScript
JavaScript is a programming language that is widely used in browsers. He has been deprecated as a bad language (he is really boring ), it is often used for show-off gadgets, pranks, or monotonous form verification. But the fact is that he is a real programming language, has its own standards and is widely supported in various browsers.
3. DOM
Document Object Model. DOM is a set of APIS for HTML and XML files. It provides the structure of the file, allowing you to change