4 ms·
Is there some reason to prefer localStorage over https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API https://developer.mozilla.org/en-US/docs
by supermatt 3y ago
Is there some reason to prefer localStorage over https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_C... ?
- brunohaid 3y agoBroadcast is messaging only, localStorage can elegantly handle messaging and state data.
- supermatt 3y agoBroadcast gives access to structuredClone and transferable objects. i.e. much reduced latency, which I would have thought desirable for this specific use-case (synchronising a 3d scene)