Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by skinner927 on Tuesday March 19, 2024 @02:36AM
(#39753438)
Just read the spec
Clients will reconnect if the connection is closed; a client can be told to stop reconnecting using the HTTP 204 No Content response code.
Another problem we've never worked out the solution to, is how to send a termination - signalling "there are no more events coming". We always end up having to roll our own, though it felt like something that should've been handled at the protocol layer.