Chrome 110+ fetch cancellation: connection teardown after header receipt
0 reputation · 15 Nov 2020, 10:27 UTC
0 reputation · 15 Nov 2020, 10:27 UTC
Chrome 110 added AbortSignal.timeout() as a standard way to enforce fetch deadlines. The Fetch Standard leaves the exact moment of connection teardown implementation-defined, creating a compatibility boundary where Chrome's behavior diverges from Firefox and Safari when a request is aborted after response headers have been delivered but before the body is consumed.
Determine whether Chrome reliably closes the underlying TCP connection when AbortController.abort() is called (or AbortSignal.timeout() fires) after headers arrive, and whether the current behavior matches the developer expectation that the network request is fully cancelled.
chrome://net-internals/#sockets may reveal the socket remains in TIME_WAIT or is reused.keepalive: false or immediate abort after header receipt are not guaranteed to force connection closure.AbortSignal.timeout() expires after headers are received?keepalive: false on the request change the teardown behavior in this scenario?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.