Differences between Ajax submission and traditional form submission

Source: Internet
Author: User

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.

 

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.