launchpad-dev team mailing list archive
Mailing list archive
Re: disabling longpoll
On 20 February 2012 15:02, Francis J. Lacoste
> On 12-02-18 05:35 PM, Cruz Bishop wrote:
>> In this case, would it be possible for the client to check how many
>> longpoll on new tabs if there's less than X connections left?
> The problem is that the JS security model doesn't let you introspect
> that client-side. A possibility would be to ask the server how many
> longpoll connections it has for the current client.
For Chrome, Opera, and Safari we could use a SharedWorker  to serve
as a single exchange - and a single connection - for all longpoll
events from Launchpad for all tabs.
It would need some changes in the way we associate pages with events,
but would probably be a much better solution all round.
And, until support for SharedWorker arrives for IE and Firefox, we
should not support those browsers. Put another way, we should only
support browsers where window.SharedWorker !== undefined.