Ajax Browser and server interactive detailed _ajax related

Source: Internet
Author: User

Before we get to know Ajax, let's take a look at how browsers and servers interact.

1. The browser sends a request to the server

2. The server receives the request information, according to the different situation returns to the browser different information

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

The above describes the browser and server interaction simple diagram, you can see in the last step, the browser received information after the content of this page has been updated, but generally we just need to update some of the content, then how to do? So the server simply changes the content of this page to all the browser, so the 2nd step, the server sent to the browser is "how many stars in the sky?" I don't know. "So much content, the browser updates the current page after the results and the results before sending a comparison, only a" I don't know ah "these contents

It's obvious, "How many stars are there in the sky?" "The content is repetitive, is there a way to send only" I don't know "? So the smart programmer just ... Will, stop, we look back to the third step, the browser received information after the current page is unloaded and rewritten, so GA, if the uninstall this step to cancel, rewrite the operation of the change is not OK? So there is a hostage between the browser and the server, he hijacked the information returned by the server, then canceled the browser uninstall operation, and modified the current page, which is the basic principle of Ajax.

To be continued, the detailed usage of Ajax will be updated in a few days and how to be compatible with different browsers

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.