Description of the difference between Ajax submission and traditional form submission

Source: Internet
Author: User

This article is mainly to the AJAX submission and traditional form submission of the difference between the detailed introduction, the need for friends can come to the reference, I hope to help you

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; F is to give up 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 forms; 4. In the process of submitting, requesting and receiving, the procedure needs to be used to process its data; F is submitted, it is done automatically according to your form structure, without the need for code intervention.

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.