background:
1. In traditional Web websites, submitting a form requires reloading the entire page.
2. If the server fails to return Response for a long time, the client will become unresponsive and the user experience will be very poor.
3. After the server returns the Response, the browser needs to load the entire page, which is also a heavy burden on the browser.
4. After the browser submits the form, a large amount of data is sent, causing network performance problems.
question:
1. How to improve?
2.What is AJAX?
3. What are the advantages?
4. What are the disadvantages?
1. What is AJAX
1. Why AJAX is needed
When you need to obtain data from the server and refresh the page, if you do not use AJAX, you need to submit the entire form. When submitting the form, send a request to the server, and the page needs to wait for the server to send the response before the page can resume operations. .
2.The concept of AJAX:
1.AJAX = Asynchronous JavaScript and XML.
2.AJAX is a technology used to create fast dynamic web pages.
3. By exchanging a small amount of data with the server in the background, the web page can be updated asynchronously.
4. You can update certain parts of the web page without reloading the entire web page.
3.What is asynchronous
The current page sends a request to the server, and the current page does not need to wait for the server response to operate the web page. After sending the request, the current page can continue to be browsed and operated.
4.What is partial refresh
We can achieve partial refresh in two ways
All resources on this website are contributed and published by netizens, or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this website are for learning and reference only. Please do not use them for commercial purposes, otherwise you will be responsible for all consequences incurred! If there is any infringement, please contact us to delete and remove it. Contact information: admin@php.cn