What are the negative effects of using javascript-Ajax too much? How can this problem be solved?

Source: Internet
Author: User
When comparing system data in the development backend, AJAX is used at the front end. if there are too many applications, what are the disadvantages? How can we improve it? When comparing system data in the development backend, AJAX is used at the front end. if there are too many applications, what are the disadvantages? How can we improve it?

Reply content:

When comparing system data in the development backend, AJAX is used at the front end. if there are too many applications, what are the disadvantages? How can we improve it?

There is basically no I/O at the front end, and ajax is an absolute main communication method.

To sum up, ajax is a request, and too many requests will naturally affect the performance. However, it is very troublesome for ajax to parse a large amount of data on the page at a time.
A page will certainly involve a lot of data. how to split the data should be considered in all aspects, such as writing efficiency and ui interaction.

In general, it depends on experience and how to process the smallest unit.

Magento2 uses knockoutjs in large quantities, and a lot of data comes from AJAX. it will be a good reference.

The most common problem is the architecture design of a large number of requests and partial data refresh.

  • The data downloaded from AJAX should be cached and then extracted after being notified.

  • How can the locally refreshed data not affect the data of other blocks.

The above problems can be solved only by a relatively macro architecture design.

I don't feel any bad effects of Ajax. if there is a problem, how can I make the SPA live ..

From the perspective of user interaction, AJAX offers more benefits and increases user experience.
From the perspective of request concurrency, it is not good, but it can also be solved through the cache, of course, the server side will also do.

Shouldn't the development background management system be completely routed by js for single pages? Why is there a saying like ajax?

The CSS Sprite technology that combines multiple icons into one image is actually designed to reduce network requests.
It can be seen that reducing network requests can improve the performance of both the browser and server.
Too much AJAX means more network requests. Obviously, too many AJAX requests are not good.
However, AJAX uses some background pages and message notifications for a good experience.

For frontend and backend separation, ajax is a key interactive communication method. you need to handle ajax asynchronous control processes.

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.