A certain web application is suffering problems caused by high server usage. In order to solve this I tried to implement tab locking, in other words, making that just one opened tab will send request to the server, while the others will just sincronize with this tab.
I tested three libraries:
- https://github.com/slimjack/IWC
- https://github.com/tejacques/crosstab
- https://github.com/nodeca/tabex
Those are the problems:
- A tab got elected and connected to the servers. The others don't connected to the servers but also don't received any message from the master tab.
- It elected a master tab, but when it's closed no other tab is assigned to be the master tab, breaking the page.
- It works well, but just for two tabs. When a third tab is opened it gets the lock and also connects to the server.
Tested on Firefox 48.0a2.
Need to test: https://github.com/RubaXa/wormhole