The reason lies in the number of concurrent browsers. In order to prevent excessive resource usage, each browser will limit the number of concurrent connections under the same domain name. Generally speaking, it is the number of Element that can be downloaded simultaneously under one domain name. As can be seen from the figure, the website uses a large number of concurrent Request at the same time (the starting time of Request is the same), but the browser's concurrent number is fully occupied, and the remaining downloads will be blocked until the previous Element processing is completed. This is also why Thunder downloads files faster than browsers download them directly, because they modify and connect the data.
So when customers encounter this problem, what suggestions can you give? ● Decentralized domain names In order to solve the blocking problem, we can decentralize the domain names of certain URLs. For example, for picture domain names, domain names similar to img.abc.com are generally used. When a page contains more than 20 pictures, at least 10 Request will be blocked, and if we divide When distributed to img0.abc.com/img1.abc.com/img2.abc.com/... and other different domain names, at least these 20 pictures Request will be processed concurrently, and the website opening speed will be significantly improved. Similarly, some css/js domain names can be processed similarly. ● Use an independent domain name We know that Taobao’s website address is: taobao.com, but if you look closely, the domain name used in the pictures on Taobao’s page is img.alicdn.com. Why not img.taobao.com? Because websites like Taobao use very large cookies. If you use the following domain name, a very long cookie will be included every time the Request picture is displayed. This is a great waste of network resources and makes the network Request slower. In order to solve this problem, a separate domain name is necessary. Network Request slows down. To solve this problem, separate domains