Re: [whatwg] HTTP/2 push detection and control in JavaScript

> On 20 Feb 2015, at 10:48, Brendan Long <self@brendanlong.com> wrote:
> 
> The obvious question to ask is “why not just poll the server”? The answer its that live streaming latency depends (among other things) on how quickly you poll. Unless you can perfectly predict when the server will have an update available, you need to either poll slightly late (introducing latency) or poll significantly more often than the server creates updates. Using server push is equivalent to to polling infinitely fast, while simultaneously reducing load on the server by making fewer requests (win/win).

For server push we already have Server-Sent Events:

https://html.spec.whatwg.org/multipage/comms.html#server-sent-events

> I’m not really concerned with how this is solved, but an example would be to add to XMLHTTPRequest:

XHR is dead. 

https://fetch.spec.whatwg.org/

-- 
regards, Kornel

Received on Friday, 20 February 2015 10:53:48 UTC