What problems does Ajax solve? How to Use Ajax? What are the issues with Ajax? Where is Ajax used in the project?

Source: Internet
Author: User

Ajax solves the problem of "refreshing new pages". When pages are updated in the traditional HTML form mode, requests must be submitted to the server each time, after the server returns the result, the UI is re-painted. In this way, the page goes through: Submit → white → re-display. The user experience is very poor. Using ajax will not cause the page to be re-submitted or refreshed.

The most essential implementation of AJAX is to use XMLHttpRequest in Javascript for HTTP requests. In development, updatepanel and jquery are usually used to simplify Ajax development. The updatepanel method is the easiest to implement Ajax, however, the data communication volume is large, because the entire viewstate needs to be passed back and forth, and it is not flexible. For complex requirements, you can use the Ajax function provided by jquery.

The internal principle of updatepanel.

The most important problem with Ajax is that cross-origin requests (www.rupeng.com → so.rupeng.com) cannot be sent, that is, requests cannot be sent from pages in the page that are different from those of the current domain name, you can use the server in the domain where the current page is located as a proxy page.

Ajax is used in the search for suggestion and data collection projects when posting in the rupeng Network project.

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.