S
S
sevic2020-06-18 23:16:06
Node.js
sevic, 2020-06-18 23:16:06

Websocket connection per tab, is this acceptable in practice?

Tell me, is it worth keeping a websocket connection from each tab, or is it better to make one connection, for example, from the main tab, and exchange data with the rest, for example, through localstorage?
I’m trying to make one connection on the main tab and transfer data to the rest of the tabs through localstorage, but I doubt that secondary tabs will correctly process data through localstorage, for example, new data will come to the main tab every 5 or 10 milliseconds.
If you leave one connection per tab, will each connection heavily load the server?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Koryakin, 2020-06-19
@zettend

All my specialists and also I use Web Worker.

B
bro-dev, 2020-06-27
@xPomaHx

Better not to overengineer ahead of time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question