Hacker News new | ask | show | jobs
by striking 3842 days ago
WebSockets are for fast, low-overhead connections. If you end up making a new HTTP connection for every update, and there are a lot of updates happening, you should be using WebSockets instead.

Otherwise, HTTP works best. It has better tooling and will soon be even faster due to HTTP/2.

1 comments

I'm surprised no one mentions xhr streaming, if your pipe is only one way i.e server notifies client, then xhr streaming is quite easy to use and as fast as websockets.
I assume most people consider XHR a kind of HTTP request. It is in the name, after all.