HTML & CSS · Senior · Question 18 of 75
How does asset bundling strategy change when moving from HTTP/1.1 to HTTP/2+?
- 1Nothing changes: the protocol has no effect on frontend builds
- 2With HTTP/2 you should concatenate absolutely every file into one bundle
- ✓Correct answer: Multiplexing makes requests cheaper, so smaller chunks pay off
Explanation
With HTTP/1.1 browsers keep ~6 connections per domain, so we concatenated files, used sprites and domain sharding. HTTP/2 and HTTP/3 multiplex requests over one connection, making those hacks less necessary or even harmful: one huge bundle invalidates the whole cache on any change. Dropping bundling entirely is still rare - compression and import chains still matter.