Find Related products on Amazon

Shop on Amazon

Show HN: Offline JavaScript PubSub between browser tabs

Published on: 2025-05-15 21:09:59

TabSub Offline Javascript PubSub between browser tabs TabSub offers you an easy to use Javascript PubSub via local storage. No server is required as all messages are shared via the browser built in local storage. Give the example a try to see what you can build with TabSub. Is this safe for a lot of concurrent writes? To be honest I have no clue. I tried to break it with 10 concurrent writers and everything worked as expected: No message got lost and the messages where in correct order. No warranty here, use at your own risk 😅 As TabSub uses local store this only works on the same domain, as the browser separates the local storage by domains as security measure. TabSub is on Github and licensed MIT Today (3.4.2025) I learned, that apparently BroadcastChannel API does the same thing (has a quite similar usage structure as well) Example Start one of the two songs and than open this site in a second tab. You will see that the playing song time syncs and if you start the other son ... Read full article.