3 ms·
People seem to always get confused by this - http/1.1 is persistent by default and the vast majority of servers/clients use it. The "Keep-Alive" header was som
by nvarsj 8y ago
People seem to always get confused by this - http/1.1 is persistent by default and the vast majority of servers/clients use it.
The "Keep-Alive" header was something tacked onto http/1.0 and doesn't really mean anything these days.
- tyingq 8y agoUnfortunately, depends on the server. Node says this: "Sending a 'Connection: keep-alive' will notify Node.js that the connection to the server should be persisted until the next request." The article seems to confirm this behavior. So clients have to account for non RFC compliant servers.
- nvarsj 8y agoAre you sure about that? That seems to violate the http/1.1 RFC. I think the node.js docs are talking about http/1.0 there. http/1.1 uses the "Connection" header to indicate whether to persist the connection.