Re: [w3ctag/design-reviews] User Preference Media Features Client Hints Headers (#632)

> One follow-up question: we were wondering how this approach compares to the use of H/2 or H/3 server push?

Seems worthwhile to point out that some browsers never shipped H3 server push, and [intend to remove](https://groups.google.com/a/chromium.org/g/blink-dev/c/K3rYLvmQUBY) the H2 variant at some point. (potentially with [Early Hints](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/early-hints.md) as a replacement)


> e.g. the HTML links to two stylesheets with appropriate media queries, when serving the original HTML request the server starts pushing both stylesheets. When the client parses the links to the stylesheets, it sees that one isn't necessary right now, so cancels the push of that stylesheet and instead adds it to a low-priority queue to fetch later.

The network stack (which is responsible for server push) has no notion of media queries, so doesn't have the info required to cancel that push, even if canceling pushes was a thing that actually works. (It's doesn't, because of the extra RTT it'd take the cancel frame to reach the server, as well as [buffer bloat](https://blog.cloudflare.com/http-2-prioritization-with-nginx/)).

In practice, this would result in both CSS files being downloaded, with the unneeded CSS likely being a blocker to more important content.


> While that approach will likely send a few packets of an unnecessary stylesheet, it also avoids the delay/round trip of the client hints

Note that [Client Hints reliability](https://github.com/WICG/client-hints-infrastructure/blob/main/reliability.md) fixes the delay/round trip issue that Client Hints had with critical HTML content negotiation.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/632#issuecomment-978990799

Received on Thursday, 25 November 2021 09:09:27 UTC