-
Notifications
You must be signed in to change notification settings - Fork 57
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 #886
Comments
We'll review the proposal soon. In the meantime I want to draw your attention to #489 and w3c/csswg-drafts#5115 which look like related efforts. |
@atanassov thanks for the pointers. I went through those issues and they don't seem related at first glance. This proposal is about when the first rendering opportunity of a Document happens, which is independent of any steps that happen as a part of the rendering opportunity (flushing style/layout). Let me know if I missed something, might be easier to discuss once you've had a chance to review the proposal. |
Just a heads up, please do see the discussion at whatwg/html#9332 when reviewing this proposal. A lot of good insightful points have been brought up on the issue. |
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 am I to infer that you no longer intend to include the I'm also a little surprised at the use of |
Personally I have concerns about adding mechanisms that allow the author to block rendering. Authors will tend to test on faster devices and connections than most users have and are prone to unintentionally making the user's experience worse. (Let's all remember the blank pages people were staring at while fonts downloaded.) Browsers already make a lot of tradeoffs trying to give the user the best experience, and authors can't predict the user's network conditions or device capabilities. I accept that the browser can't read the author's mind to know which content is more important to the user, so a mechanism that allows the author to set relative priorities rather than forced blocking seems like it would satisfy most of the needs here without the harms. |
Those exists already, and most of them are far more powerful than render-blocking on an element.
This wouldn't work for view-transitions, and a lot of this was discussed at length here. |
Please let's discuss this at whatwg/html#9332 and not in the TAG repo. The |
Yes, that's correct. We are only planning to support a single way to enable this, namely the section to which I linked above. As for FWIW, I also agree with @noamr that I prefer we take the conversation to the linked issue to make sure the discussion is visible to other participants there |
こんにちは TAG-さん!
I'm requesting a TAG review of Document Render-Blocking.
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.
Further details:
You should also know that...
This feature is needed for cross-browser compliant implementation of cross-document View Transitions, reviewed at #851.
We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify @khushalsagar @noamr.
The text was updated successfully, but these errors were encountered: