Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does a web page decide whether a TCP connection is kept open?

Surely the webpage can only use HTTP, and there is no concept of a connection in JavaScript or HTML/CSS.

So it must be the responsibility of the browser to reuse connections, or to response multiplex efficiently in HTTP/2.



If you're grabbing a bunch of medium sized assets from different servers, you cannot reuse the TCP connection.


They never said the web page decided.

(Although, to an extent, the contents of the webpage do determine how long the browser will keep the connection open. Also, WebSockets exist.)




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

Search: