Re:In protest of the web{*} bulldozer, a response to websock...
by TazeTSchnitzel on Wednesday May 20, 2020 @05:57PM
(#23252409)
Yes, and WebSockets are a clean and fast replacement for horrible hacks that preceded them. Nobody liked having to constantly poll the server one way or another, or god forbid, use Flash.
Re:In protest of the web{*} bulldozer, a response to websock...
by Thorrez on Thursday May 21, 2020 @12:15AM
(#23254730)
One alternative to repeated polling or Flash is hanging GETs. But yes, that's a pretty weird hack.
Re:In protest of the web{*} bulldozer, a response to websock...
by cygx on Thursday May 21, 2020 @02:49AM
(#23255532)
That's called 'long polling'. You can also leverage HTTP 1.1 chunked transfers. Cf https://en.wikipedia.org/wiki/Comet_(programming)
To be fair to Websockets, they've been around for almost a decade, pre-dating http/2 by a few years, and the duplex communication they offer is a fundamental building block for all kinds of stuff, from games to trading websites to chat systems.
Although the Battery API is a different story, the author's point about Websockets seems to be based on somehow having overlooked them for quite a while.