Multiple Windows Tabs or Frames
Browsers are mostly limited to 2 connections to any given host. Unfortunately this limit is applied to all windows, tabs and frames running in the same browser. So while the browser security model prevents windows, tabs and frames from directly communicating with each other, it also requires them to share the 2 connections.
This is important because if 2 tabs both initiated long polling requests to the server, then both connections would be consumed and the browser would block if any other communication was attempted.
cometd-jetty solution
Currently the cometd jetty server provides a partial solution to this problem. It can detect the multiple windows/tabs/frames and when it does so, sends them all advice with "multiple-clients":true. The application can see this advice by subscribing to the cometd/meta dojo topic and could act to warn the user about the multiple windows or even automatically disable one.
If the application takes no action, the server automatically forces the extra connections to fall back to traditional polling with an interval set by the servlet init parameter multiFrameInterval.
- Printer-friendly version
- Login or register to post comments