W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2014

Re: [whatwg] Expose XMLHttpRequest [Fetch?] priority

From: Ilya Grigorik <igrigorik@gmail.com>
Date: Wed, 1 Oct 2014 20:19:33 -0700
Message-ID: <CAKRe7JFK4DonVJM3+PQwa8kiqHj3SwmwtuJhuSdbLEeEf8CB7Q@mail.gmail.com>
To: Chad Austin <caustin@gmail.com>
Cc: WHATWG <whatwg@whatwg.org>
On Wed, Oct 1, 2014 at 7:59 PM, Chad Austin <caustin@gmail.com> wrote:

> I don't see a way to set a priority value in there.  The specific wording
> is "Streams can be prioritized by marking them as dependent on the,
> completion of other streams".
> I see that a client can specify the weight of a stream and you can say
> that a stream depends on another stream.  Neither of those are what I
> want.  I simply want to specify priorities of a bunch of requests.  How
> would I do that in HTTP 2.0?

Weight is exactly what you want:

"A stream that is not dependent on any other stream is given a stream
   dependency of 0x0.  In other words, the non-existent stream 0 forms
   the root of the tree."

All dependent streams are allocated an integer weight between 1 to
   256 (inclusive)... Streams with the same parent SHOULD be allocated
   proportionally based on their weight. "

In other words, if you don't care about dependencies, then don't assign the
parent. Doing so will make all streams children of the root of the tree
(0x0), and from there you can use weights to assign relative priority.

Hope that makes sense.

Received on Thursday, 2 October 2014 03:20:41 UTC

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