-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: add a boolean flag render-blocking
to the request
concept
#1433
Comments
These use cases are only applicable when a service worker is in use, right? And when you say Chrome has already been doing it, that's presumably limited to DevTools, which is a somewhat different use case and would not end up standardized by exposing this on |
I believe what @xiaochengh meant is that Chromium exposes this to traces, which are used by developer tooling, and found to be useful by developers. It's a different use case, but e.g. makes me think we should web expose this info in Resource Timing. I agree that an internal flag would be sufficient for that. I guess that for web-exposing the flag on the Request object itself we'd need a Service-Worker case that e.g. treats scripts and style requests differently when they are render blocking. |
Hmm, maybe I didn't realize there's a difference between the request concept and the What I really want to do is to add it to the request concept, which already supports use cases 2 & 3. We don't really have a service worker use case so we don't really need to add it to the Is adding it only to the request concept fine to you? If so, I'll revise the proposal and the PRs. |
Yeah, that is totally fine. It's in fact preferable as it allows us to evaluate the "private API" for some time before deciding it's worth exposing publicly. |
render-blocking
to the request
objectrender-blocking
to the request
concept
Thanks. I've updated the proposal and the PRs. Please review them at: |
I'm not sure about this. How would it interact with |
UA should look at both For the remaining questions, I think they all depend on whether we want blocking=render on preloads. I've responded in whatwg/html#7896. |
The HTML-side counterpart is whatwg/html#7885. Fixes #1433.
See whatwg/fetch#1433 and whatwg/fetch#1432 for background.
See whatwg/fetch#1433 and whatwg/fetch#1432 for background.
(Edited: Removed the parts about exposing it via the
Request
API)The HTML spec recently specified a render-blocking mechanism, which allows certain elements to be render-blocking, namely, to block rendering until their external resources have been loaded.
In coordination, I'm proposing to add a boolean flag,
render-blocking
, to therequest
concept to indicate whether the request is for an element that is render-blocking. For now, the flag is not web-exposed via theRequest
API.The technical details are at:
render-blocking
flag when fetching resources for render-blocking elements html#7885The motivations are:
It can be used as a signal for "chaining" render-blocking resources: render-blocking resource A can have a link header with
blocking=render
that triggers loading of another render-blocking resource. This is especially useful for eliminating FOIT & layout shifts for 3rd party web fonts (see exact usage).It can be used as a signal to set the fetch priority, so that we never fetch a render-blocking resource at the low priority. The current spec only uses two signals, which are not enough. See also discussions at
blocking=render
should override fetch priority WICG/priority-hints#69The text was updated successfully, but these errors were encountered: