3 ms·
HTTP/2 does not allow communication from server to client. Server push is another matter, not really controlled by server or client. So you'll end up to polling
by vbezhenar 11y ago
HTTP/2 does not allow communication from server to client. Server push is another matter, not really controlled by server or client. So you'll end up to polling server. This might be a bit more effective than HTTP/1 polling, but websockets will be better.
- Lukasa 11y agoSure it does. HTTP/2 streams are bidirectional. The websocket flow can be perfectly emulated in HTTP/2: make a websockety request, get a 200 HTTP response, then both sides keep the stream open and send data through it.
- vbezhenar 11y agoHow is it different from HTTP/1 with keep-alive connection?
- johnny22 11y agobasic server push can be implemented with Server Sent Events: https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events https://developer.mozilla.org/en-US/docs/Server-sent_events/...