Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by nine_k on Monday March 18, 2024 @02:23PM
(#39747994)
Can the tabs share a background worker that would handle that?
[ Parent
| on HN ]
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by merb on Monday March 18, 2024 @02:27PM
(#39748040)
You can use https://www.npmjs.com/package/broadcast-channel which creates a tab leader, no need for a background worker
Edit: of course you could use: https://caniuse.com/sharedworkers but android does not support it. We migrated to the lib because safari took its time… so mobile was/is not a thing for us