TabSub

Dev tools

javascript library

SHOW HN2025

83points
37comments
#861of 3,837 in 2025
Top 23%of 2025 by points

How HN took it

CuriousMostly questions and neutral comments

3 positive, 8 neutral or asking, 0 mixed, 1 critical, out of 12 comments about the project. Thread score +0.18.

Execution: 2 for, 0 againstPerformance: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Simple, clean code

    From 1 comment
    • I love it, the code is so simple: https://github.com/simonfrey/tabsub/blob/master/tabsub.v1.js
      edweis on HN
  • Works offline without a server

    From 1 comment
    • It means, that you don't need an internet connection for this to work :) (so it is no rabbitmq or so which runs on a server and the browser is just the client) You can try on the…
      l1am0 on HN

Objections

  • Only works on the same origin

    From 1 comment
    • From the post: > As TabSub uses local store this only works on the same domain, as the browser separates the local storage by domains as security measure. (More precisely, the…
      sltkr on HN
  • subscribe() installs a handler per topic, which is inefficient

    From 1 comment
    • The subscribe() implementation seems suboptimal in the case where there are many different topics: ``` subscribe(topic, callback) { if (this.listeners[topic] == undefined) { //…
      sltkr on HN

Requests

  • Use a single storage event handler for all topics

    From 1 comment
    • The subscribe() implementation seems suboptimal in the case where there are many different topics: ``` subscribe(topic, callback) { if (this.listeners[topic] == undefined) { //…
      sltkr on HN

Questions

  • Is localStorage a security risk across sites?

    From 1 comment
    • Isn't this a security hole waiting to be exploited? How does the browser handle access control to the local storage, especially offline when they aren't loaded from the same…
      nottorp on HN
  • How does this work on Node.js across instances?

    From 1 comment

Alternatives named

  • BroadcastChannel API

    From 1 comment
    • If I understand this correctly, the `BroadcastChannel` API solves a similar purpose. https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API
      sisk on HN
  • SharedWorker

    From 1 comment
    • You can use a SharedWorker now instead of picking a tab to do that work (and failing over to another tab if it gets closed). Support is still spotty though.
      remram on HN
  • Service worker

    From 1 comment
    • Well, you can just use a service worker, instead of broadcast channels or shared workers. They have all the functionality you need, now. Any iframe that loads in a secure context…
      EGreg on HN
  • Web Locks API

    From 1 comment

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/43569961)