Re:You might not need WebSockets
by koakuma-chan on Friday April 11, 2025 @09:02PM
(#43660349)
SSE does not require a separate connection, unlike WebSockets.
[ Parent
| on HN ]
MDN disagrees. See the huge red warning here https://developer.mozilla.org/en-US/docs/Web/API/EventSource
Unless you mean on HTTP2? But aren't WS connections also multiplexed over HTTP2 in that case?
Re:You might not need WebSockets
by koakuma-chan on Friday April 11, 2025 @10:12PM
(#43660707)
> MDN disagrees. See the huge red warning here https://developer.mozilla.org/en-US/docs/Web/API/EventSource
It should say "When used over HTTP/1" instead of "When not used over HTTP/2" because nowadays we also have HTTP/3, and browsers barely even use HTTP/1, so I would say it's pretty safe to ignore that warning.
> Unless you mean on HTTP2?
Any version of HTTP that supports multiplexing.
> But aren't WS connections also multiplexed over HTTP2 in that case?
There is RFC 8441 but I don't think it's actually implemented in the browsers.
> There is RFC 8441 but I don't think it's actually implemented in the browsers.
Found this: https://github.com/mattermost/mattermost/issues/30285
Re:You might not need WebSockets
by koakuma-chan on Friday April 11, 2025 @11:32PM
(#43661101)
https://chromestatus.com/feature/6251293127475200
It looks like it's supported in Chrome and Firefox but not in Safari.