News for hackers. Stuff that matters.
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)
Re:In protest of the web{*} bulldozer, a response to websock... by arantius on Thursday May 21, 2020 @01:13PM (#23261319)
That's unidirectional. Websockets allow fully stateful bidirectional data transfer (just like a regular socket). They're wonderful when that's what you need.
Re:In protest of the web{*} bulldozer, a response to websock... by Thorrez on Thursday May 21, 2020 @09:22PM (#23267751)
Yeah, you pair hanging GETs with XHR to get bidirectional transfer. Yeah I agree websockets are a lot easier than the hacky hanging GETs + XHR setup.