Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
HTTP 1, 2, and 3 in a Nutshell (jcolemorrison.com)
5 points by colemorrison on Sept 26, 2019 | hide | past | favorite | 2 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.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: