Sharing connection between Browser's windows and tabs - Atmosphere/atmosphere Wiki

By default, the atmosphere.js library will open a new connection (based on the available transports: websocket, long-polling, streaming, sse, jsonp or ajax) every time a new window or tab is opened by the Browser. In some case it may be more efficient to share a connection between windows/tabs. To enable the mechanism, all you need to do is to set the shared property of an AtmosphereRequest object:

  var request = new atmosphere.AtmosphereRequest();
  request.shared = true;
  request.transport = 'websocket';
  var socket = atmosphere.subscribe(request);

Now every time a new windows/tabs is opened, the connection will be shared and all events occurring on that connection will be dispatched to all windows/tabs.