Browser & Web Performance · Senior · Question 32 of 75
With HTTP/2 or HTTP/3, why might bundling everything into one JS file still not be ideal?
- 1HTTP/2 can't transfer files larger than 1 MB
- 2Bundles disable compression
- ✓Correct answer: Any change invalidates the whole bundle in cache, and the browser can't run anything until the large file is parsed
Explanation
Multiplexing reduces the cost of many requests, so finer-grained chunks give better caching. Too many tiny files still have overhead.