W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2015

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

From: Brendan Long <self@brendanlong.com>
Date: Fri, 20 Feb 2015 12:37:57 +0100
Message-Id: <D1B8A2AB-762A-4DD5-8B11-DE61411D7975@brendanlong.com>
To: Kornel Lesiński <kornel@geekhood.net>
Cc: WHAT Working Group <whatwg@lists.whatwg.org>


> On Feb 20, 2015, at 11:53 AM, Kornel Lesiński <kornel@geekhood.net> wrote:
> 
> For server push we already have Server-Sent Events:
> 
> https://html.spec.whatwg.org/multipage/comms.html#server-sent-events <https://html.spec.whatwg.org/multipage/comms.html#server-sent-events>

Using an entirely different protocol to inform the JavaScript client of events that the browser is already aware of seems like overkill.

This also doesn’t solve the problem of canceling pushed streams.

> 
>> 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/

I’ll look into what would need to be added to this. Presumably we could just add an onpush event to Request which is fired with an event containing a new Request (containing info from the PUSH_PROMISE).

It’s not clear to me how we would cancel a pushed stream, or retrieve streaming body data without waiting for the request to completely finish.
Received on Friday, 20 February 2015 11:38:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:27 UTC