Differences between Ajax submission and traditional form submission
This article mainly introduces the differences between Ajax submission and traditional form submission in detail. If you need some help, please refer to them.
Ajax submission uses js to submit requests. Both requests and responses are processed by the js engine, and the page is not refreshed. the user does not feel that the browser actually sends a request. For example, if we want the web page to always display the latest news, and do not want to refresh the button, we can use the Ajax mechanism. Online customer service software is also a good case for ajax requests. The traditional request page will be refreshed, so it has great limitations.
1. Why AJAX?
With AJAX, the user experience on the Web is more agile: the data submission page does not flash the screen, the page is updated quickly locally, and the network bandwidth usage is low.
2. the simplicity of AJAX development compared with the traditional mode:
In traditional mode, when a form is submitted, the entire page is re-painted. To maintain the changes in the form status of the page user, more code is required. You need to pass more parameters between the Controller and the template to maintain the page status. AJAX does not, because the page is only partial update, and does not affect the content of other parts of the page.
3. The difficulty of AJAX development compared with the traditional mode:
You need to understand and be proficient in JavaScript, and JavaScript has many obstacles such as debugging troubles and browser compatibility.
======================================
There are several differences:
1. ajax is asynchronous in the process of submission, request, and receipt, and the webpage does not need to be refreshed. Form is used to create a new page, even if it is submitted to its own page, it also needs to be refreshed;
2. When submitting A request, A creates A request in the background; F abandons this page and then requests it;
3. A must be implemented using JS. If a js browser is not enabled, this operation cannot be completed. F is the instinct of the browser. forms can be submitted whether or not Javascript is enabled. 4. A uses A program to process data during submission, request, and receipt. F automatically completes the process based on your form structure without code intervention.