I wanna improve my VueJS application system.
Currently, each browser tab once per 20 seconds makes synchronization with the server - getting notifications and the latest settings.
It's problematic because a typical user often has 20+ opened tabs, so each synchronizes itself.
I know, that I can share the Vuex Store between tabs, using localStorage, and currently I'm doing this, so I don't have to synchronize everyone tab, cause if one of them synchronizes, all of them will have current data about app notifications and settings.
So the question is - how to do it?
I tried using this solution, but what if the user closes the tab? How to control that, one of the tabs synchronized the data?
Thanks in advance, have a nice day!