[Seaside] Correct usage of Comet
renggli at gmail.com
Mon Apr 13 06:31:12 UTC 2009
> - How does the disconnect method work, and how and when should I call
> it. If I am using Comet from numerous components, can it cause
> problems with the browser, if I don't call disconect.
Web browsers usually limit the number of open connections per Window.
The exact number depends on the browser, but in all cases it is rather
low. As far as I remember the default setting in FireFox limits it to
two concurrent connections. So if you want to do AJAX calls aside, you
can only have one Comet connection per page. Thus in you case all
components probably want to share a single Comet connection.
> - What is the correct usage of the reconnect method?
Normally you don't need to call these methods manually, unless you
want limit the lifetime of a Comet connection. #disconnect is
automatically performed when you navigate to a new page, #reconnect is
automatically performed when you loose an open connection.
More information about the seaside