Please be aware that there is a web standard for this since quite some time. See server-sent events and the EventSource interface:

https://developer.mozilla.org/en-US/docs/Web/API/Server-sent... https://developer.mozilla.org/en-US/docs/Web/API/EventSource

Not the same. SSE doesn't support binary, and has higher framing overhead than you can achieve with raw HTTP. If you don't need binary it's a solid option in the browser.

That can be used with https://mercure.rocks :)