5 ms·
Use BroadcastChannel; you don't need no sockets https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API https://developer.mozilla.org/en-US/docs
by rtcode_io 3y ago
Use BroadcastChannel; you don't need no sockets
https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_C...
- deleted 3y ago[deleted]
- bigyikes 3y agoNice, my first thought was to use LocalStorage. Didn't know about BroadcastChannel. Sounds like OP wanted to use sockets for fun though. >The original work by Bjorn Staal used localStorage, but I found sockets more fun, because if tweaked a bit, this can be shared with friends. Who among us hasn't overcomplicated things for fun? :)