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

Support chaining of render-blocking #7899

Closed
xiaochengh opened this issue May 6, 2022 · 1 comment
Closed

Support chaining of render-blocking #7899

xiaochengh opened this issue May 6, 2022 · 1 comment
Labels
addition/proposal New features or enhancements topic: rendering

Comments

@xiaochengh
Copy link
Contributor

It would be very useful (or at least for web fonts, see use case) if we support chaining of render-blocking. The idea is that if:

  • We have a blocking=render element A in document head (so it can successfully block rendering)
  • A's subresource reponse contains a Link header that preloads resource B with blocking=render

Then we want to ensure that B can also successfully block rendering.

We currently can't ensure it. We currently don't process subresource link header (#7691). Another reason is that we allow adding render-blocking elements only if the body of the document hasn't been inserted yet. So there's a race condition that B can become render-blocking only if A's subresource response arrives before body is inserted.

To fix it:

  • Need to resolve Proposal: add a boolean flag render-blocking to the request concept fetch#1433
  • Add a "backdoor" to preload link header so that we can add it to the render-blocking element set even after body insertion, as long as the original subresource request is render-blocking (which guanrantees that the document is currently still render-blocked, so it's still safe to add new render-blocking elements).
@xiaochengh
Copy link
Contributor Author

I'm not going to pursue this due to #7896.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements topic: rendering
Development

No branches or pull requests

2 participants