-
Notifications
You must be signed in to change notification settings - Fork 381
Description
(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 the request concept to indicate whether the request is for an element that is render-blocking. For now, the flag is not web-exposed via the Request API.
The technical details are at:
- Add a render-blocking boolean flag to the request concept #1432
- Set requests'
render-blockingflag when fetching resources for render-blocking elements html#7885
The 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=renderthat 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=rendershould override fetch priority WICG/priority-hints#69