Reduce, Reuse, Recycle
When using WebSockets to communicate between your server and the client every new browser context–tab, window, iframe, and so on–is likely to create another WebSocket connection. All these open connections can quickly take a toll on your server resources, or if you’re using a PaaS which charges for each connection, it could quickly add up to a big bill.
In this talk, we’ll look at how you can use SharedWorkers to create a single persistent WebSocket which can be used by every browser context to …