Bayeux protocol and how it supports multiple tabs opened in a single browser

StackOverflow https://stackoverflow.com/questions/11751008

  •  24-06-2021
  •  | 
  •  

質問

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