Use BroadcastChannel
When many tabs are opened to the same server, there is a long-polling request per tab. With the browser limit of 6 connections per server, this may prevent to open more tabs. An option is to use BroadcastChannel to choose a single tab to perform the long polling and broadcast the event to all other tabs. We will need to implement an election mechanism for the leader tab (and manage when it is closed) (e.g https://github.com/bjester/broadcast-channel/blob/master/src/leader-election.js). The mechanism should take care of the user and database used so the broadcast and election should be only between tabs for the same database and user.