3 ms·
I believe browsers will close the socket, not keep it open and then discard the response. Browsers certainly have no way to terminate server execution.
by marshmellman 7y ago
I believe browsers will close the socket, not keep it open and then discard the response. Browsers certainly have no way to terminate server execution.
- shireboy 7y agoI was thinking that at first too, but the more I thought about it, maybe they do? For example if I GET /some/large/file.pdf, get 50% through, then cancel, the server is not going to _keep sending the bits_, is it? It should handle the socket closed stop reading the file, etc. With sever code, I've never seen IIS cancel ASP.NET code, but now I'm wondering if it doesn't make sense in some cases... Actually, yeah, you can do it in ASP.NET, looks like: https://andrewlock.net/using-cancellationtokens-in-asp-net-core-mvc-controllers/ https://andrewlock.net/using-cancellationtokens-in-asp-net-c...