[whatwg] [Server-Sent Events] Infinite reconnection clarification

Tab Atkins Jr. jackalmage at gmail.com
Fri Apr 27 09:15:12 PDT 2012


On Fri, Apr 27, 2012 at 4:12 AM, Odin Hørthe Omdal <odinho at opera.com> wrote:
> I think I should do a TLDR since I didn't really get any answers:
>
> 1. Should EventSource *ever* time out once it has once been connected?
> 2. What do browsers do today? What do you think is a good thing to do?
>
> I tried Opera, Firefox and Chromium for question 2.
>
> Opera: Gives up after 2-3 minutes.
> Firefox: Gives up after ~15 minutes.
> Chromium: Doesn't ever give up. Longer and longer retry intervals, upper
> limit (I think) of 1 minute between each retry.

I think the best thing for users is infinite reconnect with
exponential backoff (the Chrome behavior).  This gives the page the
best chance of "just working" when the user gets back into an area
with connection.

Waking up the radio once a minute isn't bad, if we can coalesce all
our EventSource requests to use the same window.

~TJ



More information about the whatwg mailing list