Add full-framerate
render blocking attribute
#11070
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
What problem are you trying to solve?
We would like to explore the possibility of improving the loading performance by adaptively lowering the frame rate during loading.
What solutions exist today?
The render blocking mechanism may be adopted to throttle the rendering. By adding a
<link rel="expect" blocking="render">
element, the webpage can stop rendering until certain critical elements are fully parsed. However this will cause the page to be fully stalled and delay the user interaction. Thus we plan to add new experimental APIs to instruct the renderer to work at a lower priority.The new API will be experimental. We plan to first adopt it on certain sites with origin trial and collect data about how lowering the frame rate affects the loading performance and user experience.
How would you solve it?
We propose to add a new render blocking token
full-framerate
to the blocking attributes. When the renderer is blocked with thefull-framerate
token, the renderer will work at a lower frame rate so as to reserve more resources for loading.An example use case of the proposed API will be:
The web page contains an element
<link rel="expect" href="#critical-content" blocking="full-framerate"/>
in the page head. After parsing this element, the renderer will work at an implementation-specific lower frame rate.After the
#critical-content
element is parsed, the renderer will restore its frame rate.It is worth noting that the frame rate instructions will be informative. The browser may decide to lower the frame rate before parsing a blocking element. For instance, the frame rate may be lowered at the very beginning of the loading phase. On the other hand, the browser may also decide to restore the frame rate before the frame rate blocking element list gets empty. For instance, the frame rate may be restored after a timeout or certain user interactions.
An alternative approach is to introduce window.enableMaxPossibleFrameRate() and window.maybeLowerFrameRate() js API. The js API is more natural to express the fact that the frame rate instructions are non-mandatory. However we may still prefer the first approach because it reuses the current render blocking mechanism.
Anything else?
No response
The text was updated successfully, but these errors were encountered: