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.