Skip to content

HTTP 1, 2, and 3 in a Nutshell

start.jcolemorrison.com
5 pointscolemorrison2 comments
On HN

Comments

I don't understand "using ONE TCP connection, it can send multiple request/responses in parallel!".

Say a browser sends 2 requests in parallel using the same socket.

one request asks for a png image, one request asks for a css file. The server returns 32 bytes of data back. How does the client know what that 32 bytes are? are they part of the png image or the css file?

Well of course because HTTP/2 is a layer on top TCP. While TCP 32 byte package header will allow the OS to route it to your socket, the HTTP/2 package header will allow the browser to route it to the correct request-response.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.