Hacker News new | ask | show | jobs
by derefr 4034 days ago
There's not much you can do with a websocket that you can't do with a Server Sent Event stream plus AJAX requests. HTTP/2 just makes that design (relatively) performant by shoving all those together into one multiplexed connection.

Websockets are still important if you need something like real-time input-event streaming (e.g. for an online game); a properly-structured binary protocol sent over a websocket will be much lower-overhead than the equivalent HTTP/2 frames.