Ajax submission is through JS to submit the request, the request and response by the JS engine to deal with, the page will not refresh, the user does not feel the actual browser issued a request. For example, we want the page to always show the latest news, but do not want to always click the Refresh button, we can use the AJAX mechanism to implement. Online customer service software is also a better example of AJAX requests. The traditional request page will be refreshed, so the limitations are great.
1. Why use Ajax?
With Ajax, the user experience with the web is more "agile": The data submission page does not splash, the page is updated faster, and the network bandwidth is low.
2.AJAX development compared to the traditional mode of the simple place:
In traditional mode, the form submission is redrawn across the page, and more code is needed to keep the page users from changing the form's status. To pass more parameters between the controller and the template to keep the page state. And Ajax is not, because the page is only local update, do not care about the other parts of the page will not affect the content.
3.AJAX development is more difficult than traditional mode:
Need to understand, proficient JavaScript, and JavaScript there are debugging trouble, browser compatibility, and many other obstacles.
=================================
There are several differences:
1. Ajax in the submission, request, receive, are asynchronous, the Web page does not need to refresh; form submission is to create a new page, even if it is submitted to its own page, but also need to refresh;
2. a creates a new request in the background at the time of submission, and the F is to discard this page and then request;
3. A must use JS to achieve, do not enable JS Browser, can not complete the operation; F is the browser's instinct, whether or not to open JS, can submit a form; 4. A when submitting, requesting, receiving, the whole process needs to use a program to process its data; F commits, it is automatically completed according to your form structure, without code intervention.