Summary of Ajax Principles

Source: Internet
Author: User

Ajax Full Name

Asynchronous JavaScript and XML (asynchronous JavaScript and XML)

Synchronous and asynchronous

An asynchronous transmission is a character-oriented transmission in which the unit is a character

Synchronous transmission is a bit-oriented, unit is a frame, transmission requires the receiver and the sender's clock is consistent.

Understanding Ajax through XMLHttpRequest

The AJAX principle is simply to send an asynchronous request to the server via XMLHttpRequest, get the data from the server, and then use JavaScript to manipulate the DOM and refresh the page.

XMLHttpRequest Object Properties


! [XMLHttpRequest Object Properties] (Http://7u2eqw.com1.z0.glb.clouddn.com/XMLHTTPRequest object properties. png)

Ajax is the use of JavaScript technology and XMLHttpRequest objects between Web Forms and servers, when the user requests to the server, the data sent to the JavaScript code instead of directly to the server, JavaScript code in the background to send an asynchronous request, The server then returns the data to the JavaScript code. After the JavaScript code receives the data, manipulate the DOM to update the page data.

Ajax Synchronous and asynchronous

Async: Ajax is always executed without blocking the response from the server, so it is not effective to assign values to variables in a function when using asynchronous Ajax.

Synchronization: Ajax is blocking, waiting for the server to return data to perform the next step.

AJAX schematic diagram

Summary of Ajax Principles

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.