Talk about the pros and cons of Ajax _ajax related

Source: Internet
Author: User

Ajax, the full name asynchronous Javascript and XML, is a dynamic Web application development technology, its emergence enriches the user's experience. Even Web applications developed with Ajax can achieve the experience of desktop applications. Of course, as with other technologies, Ajax also has its own advantages and disadvantages.

advantages of using AJAX

1. Enhance the user experience

Enhance the user experience this is one of the most important reasons to use Ajax. Ajax allows a Web page to request a small amount of data from the server to achieve continuous updates, using this method to refresh only parts of the page without reloading the entire page. Traditional Web pages are the result of reloading the entire page to update the page data, even if there is little data to update. So AJAX usage improves browser performance and greatly improves browsing speed through this response-style user experience.

2. Improve work efficiency

The Ajax class Library provides a number of helper functions for object-oriented schemas, which greatly improve the development speed and reduce the obstacles encountered in the development process. In addition, in many mature frameworks have their own data tier, business layer and view layer, so Ajax only need a specific AJAX services and some improvements on the client can achieve the desired functionality. The architecture of this approach reduces the time spent on program deployment and increases the productivity of developers.

3. Reduce bandwidth usage and increase access speed

Ajax uses the client script to interact with the Web server, using JavaScript to Exchange data. Using AJAX to reduce network load, reduce bandwidth usage, and request only the required data is a necessary factor for faster response times. The response time is shortened, and the performance and speed are naturally greatly improved.

4. Very good compatibility

Since Ajax is a client-side technology, AJAX services can be implemented for commonly used server-side programming languages, such as PHP, Java, ASP.net, node.js, and so on. And almost all browsers support Ajax.

5. Support Asynchronous processing

Using XMLHttpRequest to get data asynchronously is the main feature of Ajax. Before the request is executed, the program can continue to execute downward, and then perform the appropriate action after the request returns. Such a mechanism is the main reason for improving Web performance.

6. Make the page content switch simpler

Ajax makes different content switching become more intuitive, users do not need to use the browser on the traditional form of fallback and forward button to achieve the page forward and backward function.

disadvantages of using Ajax

1. Incompatibility between browsers

Ajax has a lot to do with JavaScript, so the way it is implemented in different browsers is also different. This means that if you want to implement Ajax across browsers, you must deal with it accordingly. If some browsers do not support JavaScript or this option prohibits JavaScript, then this browser does not support Ajax, so the AJAX features previously written on this type of browser can not be implemented. It is because Ajax relies on this feature of JavaScript that Ajax is not suitable for applications on the mobile side.

2. Not safe

Because Web pages are hard to debug, your Web page is facing growing threats as your code increases.

3. Increased load on the Web server

If you add the ability to automatically request updates to the server every few seconds on your Web page, your server's load will become larger and worse, and the server will probably crash.

That's right. Since each technology has its advantages over other similar technologies, there will certainly be corresponding shortcomings, as to whether or not it depends on our actual project needs, in the actual work to measure.

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.