Repository navigation
Make fetch priority at least auto if element is render-blocking - #70
xiaochengh wants to merge 1 commit into
Conversation
| <ol> | ||
| <li><p>If the element is [=render-blocking=] and the current state of its | ||
| [=fetchpriority attribute=] is [=low=], then the [=computed fetch priority=] is the | ||
| [=auto=] state;</p> |
There was a problem hiding this comment.
Or should I bump both auto and low to high? Because it seems that Chrome treats some auto as low:
|
Noted in the issue but the fetch integration already has |
|
The problem is that you need to combine both signals. And the fetchpriority signal only exists in this spec. So this spec is the right place to do the monkeypatch, I think. |
|
@domenic you combine a lot more signals than just these two. Content type, element position, async/blocking, etc all go into the internal priority calculation. I'm happy to take a monkeypatch that changes the internalpriority calculation to take render=blocking as an input but I don't think the attribute should directly change the fetchpriority itself. For example, browser-detected render-blocking scripts and CSS get a higher internalpriority than those that are not render-blocking. The render=blocking attribute is just a direct way of causing a fetch to also be render-blocking and it would get a higher priority as a result. |
Fixes #69
The idea is that if an element is render-blocking, it should not be fetched at the
lowpriority. Hence this PR introduces the notion of "computed fetch priority" that bumps the priority to at leastautoif the element is render-blocking.