3 ms·
What is the advantage of SSE over streaming ndjson?
by schmichael 3y ago
What is the advantage of SSE over streaming ndjson?
- deleted 3y ago[deleted]
- paulddraper 3y agoBuilt-in client API for parsing and event dispatching. Data doesn't have to be JSON encoded. But fundamentally nothing that Comet, steaming XHR, etc, WebSockets, can't do.
- tentacleuno 3y agoA streaming XHR is more wasteful in that it constantly has to renegotiate TLS. This is unlike EventSources and WebSockets, which do not.
- paulddraper 3y ago? Why do you believe that?
- tentacleuno 3y agoBecause that's how the protocol works at a fundamental level. If you're making new requests over HTTP, you have to renegotiate TLS.