Skip to content

Proposal: add a boolean flag render-blocking to the request concept #1433

@xiaochengh

Description

@xiaochengh

(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:

The motivations are:

  1. 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).

  2. 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#69

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions