Improve websocket persistence
DutchBen opened this issue · comments
The websocket connection between browser and server is kept fresh by initiating a ping/pon every x seconds. This is set using a setInterval. When a page becomes inactive - it might be in a tab that's not currently active - the interval stops executing and the websocket disconnects.
One possible solution for this is to use a webworker https://medium.com/@adithyaviswam/overcoming-browser-throttling-of-setinterval-executions-45387853a826