Details about the interaction between browsers and servers in Ajax, and details about ajax

Source: Internet
Author: User

Details about the interaction between browsers and servers in Ajax, and details about ajax

Before learning about Ajax, let's take a look at how browsers interact with servers.

1. the browser sends a request to the server

2. The server receives the request information and returns it to the browser based on different situations.

3. the browser receives the information and outputs it to the current page.

The previous section describes the simple interaction between the browser and the server. In the last step, the browser receives the information and updates all the content on this page, but in general, we only need to update part of the content. What should we do? So the server simply changes the content of this page and sends it to the browser. in step 2, the server sends "How many stars are there in the sky?" to the browser? I don't know. "when there are so many contents, the browser will re-update the results of the current page and compare the results before sending, only" I don't know "more.

Obviously, how many stars are there in the sky? "The content is repeated. Is there a way to send" I don't know? So a smart programmer just needs .... then, stop. Let's look back at Step 3. After the browser receives the information, it uninstalls the current page and overwrites it. so ga. If you cancel this step, isn't it OK to change the rewrite operation to modification? So there is a hijacking between the browser and the server. He hijacks the information returned from the server, cancels the uninstallation of the browser, and modifies the current page. This is the basic principle of Ajax.

The details of Ajax usage and compatibility with different browsers will be updated in a few days.

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.