Hacker News new | ask | show | jobs
by davideast 3270 days ago
HTTP/2 happened. HTTP/2 allows you to send HTTP requests over a single TCP connection per domain. Headers are compressed. The request overhead is minimal compared to HTTP/1.x.

Caching one big file has the draw back of busting the cache each time the file is updated for any small change.

Caching multiple small files allows you to have a finer grain cache. Only bust the things that updated. And, since it's all the same TCP connection it's now performant to load this way.

2 comments

Can't you do that already by reusing the 1.1 connection? Or is the 2.0 change that requests are now parallel?
Yep, more wording was bad. In HTTP/2 it's all parallel.
>HTTP/2 allows you to send HTTP requests over a single TCP connection per domain.

HTTP/1.x definitely has support for this. Not using it actually may get your IP temporarily blocked from many sites.

Sorry, wrote this before coffee. I was referring to H/2 eliminating head-of-line blocking. HTTP/2 gives you one TCP connection for multiple requests rather than the 7 connection limit browsers impose on HTTP 1.x