▲ | bilekas 5 days ago | |
> I'm no frontend expert but cant you just open a websocket and when the websocket dies from the server's perspective, you have your cue to do whatever cleanup you wanted to do? If I'm not mistaken, and I very well might be, it's kind of the same, however a WS connection here may be less reliable, infact if the user has a spotty connection, when you think "That user left", in the case of a local cleanup, okay that could run on the client side, however this beacon seems to be aimed at sending data back to the server when you leave, in the case of a dropped connection, you wont be able to send the data back anyway to the server. For this 'browser' based implementation under the hood, the browser *should* have more insight into the real intention of the users exit. | ||
▲ | Arch-TK 4 days ago | parent [-] | |
I really wouldn't want to be doing anything that requires reliability on the back of either solution as user agents can just opt to never send beacons. |