Re:HTTP 1, 2, and 3 in a Nutshell
by billconan on Thursday September 26, 2019 @04:55PM
(#21085440)
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?
Re:HTTP 1, 2, and 3 in a Nutshell
by ktpsns on Friday September 27, 2019 @02:30AM
(#21089045)
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.
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?