My question is regarding how Bayeux protocol is making it possible to have multiple tabs opened in a single browser. If we use publish/subscribe paradigm also, we need to send request to server for subscribing then will that connection be opened? If opened then how is it preventing the connection limit. If the connection is not opened then how does the server send the data to multiple tabs.

有帮助吗?

解决方案

The HTTP standard connection limit is recommended to be 2, but that is only a recommendation. No modern browsers actually impose a 2 connection limit anymore.

However, to address this the Bayeux protocol also recommends that applications use cookies to detect when multiple tabs are open and prompt the user to close all but one.

http://svn.cometd.com/trunk/bayeux/bayeux.html

It is RECOMMENDED that Bayeux client implementations use client side persistence or cookies to detect multiple intances of Bayeux clients running within the same HTTP client. Once detected, the user MAY be offered the option to disconnect all but one of the clients. It MAY be possible for client implementations to use client side persistence to share a Bayeux client instance.

其他提示

The updated Bayeux specification is at http://docs.cometd.org/reference/#bayeux.

The handling of multiple clients from the same browser is discussed in the CometD reference at http://docs.cometd.org/reference/#java_server_multiple_sessions.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top