Haven’t blown water for a long time, today just see a web development optimization, by the way pull ~

A little reminiscing before we get started 😁

Recall in the beginning of 14 years of social livestock career, the general network, and IE678 these antique rampant, at that time is really a variety of toss, other than, just heard to be compatible with XXX on the brain pain, but also to find a solution T: T all over the world

This is not to make fun of IE how bad it is, it is a contemporary, it was very advanced when it was first released, but Lian Po has always been regarded as being out of step with the development. On the contrary, IE has a strict technical requirements for developers, writing code and style to meet the standards, such as variable promotion implicit conversion such as basic grasp, style is not good, two tears.

Having gone through the good front-end development of that era, the code was conditioned to accommodate a variety of scenarios, largely avoiding the possibility of error.

In addition to browser limitations, the web is also a problem. HTTP/1.X protocol, except DNS resolution, each resource must pass through TCP to carry the content of the HTTP request packet on the third handshake. Compared to HTTP/2, which has technologies such as multiplexing, setting request priorities freely, and header compression, HTTP/ 1.x can load web resources very quickly. (Refer to the following figure for comparison)

At that time of the page optimization strategy, we listen to/use the most is similar to Sprite diagram merge, image compression, style loading to put in the head, JS script to be introduced at the bottom of the body, lazy loading, etc., can baidu search a brain all make. There is no way, the bandwidth limit policy, the browser for the same domain name, at the same time can only 4 connections (different browser kernel may be different), more than the maximum number of browser connections, subsequent requests will be blocked.

In general, the environment at that time was too fault-tolerant, and the optimization points I listed could bring some improvement.

However, it is now 2021, and ES6 is prevalent. Compared with the previous slash-and-burn, environmentally unfriendly and so on, the current batch of easy development, the previous optimization point effect can be almost negligible. The network is fast enough, the amount of concurrent download resources is greatly improved, the device performance is also powerful, in addition to rich media (such as video, audio), other resources are basically loaded in seconds to complete, as long as it is not a page loading hundreds of pictures at the same time, users can hardly feel the difference brought by the previous optimization points. Well, ▔ ▔ ㄏ

In this case, there is little point in advocating an old set of optimizations such as Sprite charts. I’m in favor of lazy loading, vUE asynchronous components, web startup diagrams, skeleton screens, and other strategies that can improve user experience are great. Other according to the regular page structure for web development

Pull out.