Intent to Ship: 'blocking=rendering' attribute on scripts and style sheets

421 views
Skip to first unread message

Xiaocheng Hu

unread,
May 23, 2022, 3:21:47 PM5/23/22
to blin...@chromium.org

(Note: The feature no longer works on preloads, compared to the original I2P. See explainer for details.)


Contact emails

xiaoc...@chromium.org

Explainer

https://gist.github.com/xiaochengh/9404abbecdc3b45c0e9f3d5e99fbc65d#file-proposal-v3-md

Specification

https://github.com/whatwg/html/pull/7474

Summary

Allows putting 'blocking=render' as an attribute and value to a <script>, <style> or stylesheet <link> to make it explicitly render-blocking. The main usage is to avoid a flash of unstyled content or user interactions with an immature page caused by, e.g., script-inserted scripts/stylesheets, client-side A/B testing, etc.



Blink component

Blink>HTML

Search tags

renderblocking

TAG review

https://github.com/w3ctag/design-reviews/issues/727

TAG review status

Pending

Risks



Interoperability and Compatibility

This is a new feature. There are interop/compat risks only if other browsers do not implement it.



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/608)

WebKit: No signal (https://lists.webkit.org/pipermail/webkit-dev/2022-January/032088.html)

Web developers: Positive (https://bugs.chromium.org/p/chromium/issues/detail?id=1271296)
Generally positive / no major concerns when discussed at WHATWG (https://github.com/whatwg/html/issues/7299#issuecomment-985907750) and WebPerfWG (https://docs.google.com/document/d/1GQpM8IvL4feXQ0oQdCQIPKhZZkMLNTYJQhBUntMxPkI/edit#heading=h.mldk2zafi9mw)

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No.



Debuggability

Yes. Each network request emits a trace event, which has a renderBlocking flag indicating whether the resource blocks rendering. For more details, see https://blog.webpagetest.org/posts/new-render-blocking-indicator-in-chrome-and-webpagetest/



Is this feature fully tested by web-platform-tests?

Yes

Flag name

chrome://flags/#enable-experimental-web-platform-features

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1271296

Estimated milestones

DevTrial on desktop102
DevTrial on Android102


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5452774595624960

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/ujX8Vbr_VFE/m/Z61eyTcoBAAJ


This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
May 25, 2022, 5:03:42 AM5/25/22
to Xiaocheng Hu, blink-dev
Thanks for working on this!! :)

On Mon, May 23, 2022 at 9:21 PM Xiaocheng Hu <xiaoc...@chromium.org> wrote:

(Note: The feature no longer works on preloads, compared to the original I2P. See explainer for details.)


Contact emails

xiaoc...@chromium.org

Explainer

https://gist.github.com/xiaochengh/9404abbecdc3b45c0e9f3d5e99fbc65d#file-proposal-v3-md

Specification

https://github.com/whatwg/html/pull/7474

Summary

Allows putting 'blocking=render' as an attribute and value to a <script>, <style> or stylesheet <link> to make it explicitly render-blocking. The main usage is to avoid a flash of unstyled content or user interactions with an immature page caused by, e.g., script-inserted scripts/stylesheets, client-side A/B testing, etc.



Blink component

Blink>HTML

Search tags

renderblocking

TAG review

https://github.com/w3ctag/design-reviews/issues/727

I pinged the TAG review. Seems like we can wait a few more days to give them time to reach conclusions.
 


TAG review status

Pending

Risks



Interoperability and Compatibility

This is a new feature. There are interop/compat risks only if other browsers do not implement it.



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/608)

I'd even say that they are cautiously slightly positive :)
 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFqEGhaaBjkqwTRoJpstgJoYhFvgPQ5DFrFfR0hQo%3DKMJ2NjLg%40mail.gmail.com.

Daniel Bratell

unread,
Jun 1, 2022, 11:50:28 AM6/1/22
to Yoav Weiss, Xiaocheng Hu, blink-dev

Yoav Weiss

unread,
Jun 8, 2022, 2:56:51 AM6/8/22
to Daniel Bratell, Xiaocheng Hu, blink-dev
LGTM2

Mike Taylor

unread,
Jun 8, 2022, 10:58:42 AM6/8/22
to Yoav Weiss, Daniel Bratell, Xiaocheng Hu, blink-dev

Xiaocheng Hu

unread,
Jun 8, 2022, 12:18:00 PM6/8/22
to Mike Taylor, Yoav Weiss, Daniel Bratell, Xiaocheng Hu, blink-dev
Thanks for the approval! I'll enable it in M105, after the M104 branch this week.
Reply all
Reply to author
Forward
0 new messages