News for hackers. Stuff that matters.
Re:Back to basics: Why we chose long-polling over websockets by josephg on Sunday January 05, 2025 @08:26AM (#42601593)
The standard way to fix that is to send ping messages every ~15 seconds or something over the SSE stream. If the client doesn’t get a ping in any 20 second window, assume the sse stream is broken somehow and restart it. It’s complex but it works.

The big downside of sse in mobile safari - at least a few years ago - is you got a constant loading spinner on the page. Thats bad UX.

There are no comments on this comment yet.