Reduce HTTP requests or not?

前端 未结 7 1977
野性不改
野性不改 2021-02-01 05:57

A theoretical question:
We all know about the pro\'s of minifying and combining javascript files in order to reduce HTTP requests to speed up a website. But when popular jav

7条回答
  •  礼貌的吻别
    2021-02-01 06:25

    There's no particular reason that getting one script would be faster than getting it split. It happens because browser concurrent downloads are limited, but not by one.

    I think the idea should be to handle synchronous UI scripts first, and then the "user activity response" scripts (like validation, etc).

    All else given equal, option B looks as the best one.

提交回复
热议问题