3 ms·
Are you talking about Server-sent Events (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events https://developer.mozilla
by nirui 2y ago
Are you talking about Server-sent Events (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events https://developer.mozilla.org/en-US/docs/Web/API/Server-sent...)? Which can be implemented under HTTP/1 too.
HTTP/2 Server Push is another thing. It allows server to send additional related resources to a client without the client explicitly requesting.
- klabb3 2y agoNot wrong, but for context: websocket http/1.1 only. It cannot use http/2 at all.
- nirui 2y agoI think it's more of a problem on the implementation side. IETF RFC 8441 (https://www.rfc-editor.org/rfc/rfc8441.html https://www.rfc-editor.org/rfc/rfc8441.html) described a way to bootstrap WebSocket under HTTP/2. That said, I don't know whether or not people are actually doing it in the wild.
- realharo 2y agoAs far as web frameworks go, WebSockets over HTTP/2 are supported in for example ASP.NET by default (https://learn.microsoft.com/en-us/aspnet/core/fundamentals/websockets?view=aspnetcore-8.0#http2-websockets-support https://learn.microsoft.com/en-us/aspnet/core/fundamentals/w...). There is however still a surprising amount of languages/libraries/frameworks/servers where the support is missing (e.g. go https://github.com/golang/go/issues/49918 https://github.com/golang/go/issues/49918). On the client side, both Chrome (https://chromestatus.com/feature/6251293127475200 https://chromestatus.com/feature/6251293127475200) and Firefox will use it when available, but I have encountered some issues with cross-origin support (https://issues.chromium.org/issues/363015174 https://issues.chromium.org/issues/363015174)
- klabb3 2y agoGP here. This was completely new to me despite working with it day to day. Thanks for sharing. This gives me some hope about having websockets be more in line with the rest of the stack.