Skip to content
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

Document Render Blocking #245

Open
khushalsagar opened this issue Aug 28, 2023 · 2 comments
Open

Document Render Blocking #245

khushalsagar opened this issue Aug 28, 2023 · 2 comments
Labels
from: Google Proposed, edited, or co-edited by Google. topic: html Spec relates to HTML (Hypertext Markup Language) venue: WHATWG HTML Workstream venue: WICG Proposal is incubated in the Web Incubator Community Group

Comments

@khushalsagar
Copy link

WebKittens

@smfr

Title of the spec

HTML

URL to the spec

whatwg/html#9332

URL to the spec's repository

No response

Issue Tracker URL

No response

Explainer URL

https://github.com/WICG/view-transitions/blob/main/document-render-blocking.md

TAG Design Review URL

w3ctag/design-reviews#886

Mozilla standards-positions issue URL

mozilla/standards-positions#875

WebKit Bugzilla URL

No response

Radar URL

No response

Description

The Web is designed with a model for incremental rendering. When a Document is loading, the browser can render its intermediate states before fetching all the requisite sub-resources, executing all script or fetching/parsing the complete Document. While this is great to reduce the time for first paint, there is a tradeoff between showing a jarring flash of intermediate Document state (which could be unstyled or have more CLS) vs blocking rendering on high priority sub-resources within a reasonable timeout.

The render-blocking concept helps browsers in making this tradeoff. It lets authors specify the set of stylesheets and script elements which should block rendering. For example, a stylesheet with the rules necessary to ensure a stable layout. But authors can’t specify which nodes should be added to the DOM before first render. This proposal aims to fill this gap.

@lukewarlow lukewarlow added topic: html Spec relates to HTML (Hypertext Markup Language) venue: WHATWG HTML Workstream venue: WICG Proposal is incubated in the Web Incubator Community Group labels Aug 28, 2023
@nt1m nt1m added the from: Google Proposed, edited, or co-edited by Google. label Oct 20, 2023
@vmpstr
Copy link

vmpstr commented Dec 15, 2023

Hi, please note that we're proposing the following solution: https://github.com/WICG/view-transitions/blob/main/document-render-blocking.md#blocking-element-id

This is in a spec PR here: whatwg/html#9970

@vmpstr
Copy link

vmpstr commented Feb 6, 2024

FYI, Chromium is considering shipping this feature in the near future. Please let me know if there are any concerns with the proposal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Google Proposed, edited, or co-edited by Google. topic: html Spec relates to HTML (Hypertext Markup Language) venue: WHATWG HTML Workstream venue: WICG Proposal is incubated in the Web Incubator Community Group
Projects
None yet
Development

No branches or pull requests

4 participants