How to keep websockets alive in background?
WS Connection opens and stays open for quite a long time – which is great. If you leave the page for a long time or the computer goes to sleep/hibernation, the WS connection closes and is never re-established.