You can find the code for this post on SharedWorker WebSocket example. Web Sockets Web Sockets allow real-time communication between the client browser and a server. They are different from HTTP because they not only allow client to request data from the server but also allow server to push data from the server. The Problem But in order to allow this each client needs to open a connection with the