[meta] Fetch Priority (was Priority Hints)
Categories
(Core :: Networking, task, P3)
Tracking
()
People
(Reporter: valentin, Unassigned)
References
(Depends on 10 open bugs, Blocks 1 open bug, )
Details
(4 keywords, Whiteboard: [necko-triaged])
Comment 1•1 year ago
|
||
FYI, there is discussion on the HTML spec PR about removing it from iFrame and leaving it as a hint for same-document subresources and exploring iFrame scheduling separately.
https://github.com/whatwg/html/pull/8470#discussion_r1106835444
In Chrome, prioritizing the fetch of the iFrame navigation resource might be ineffective and not do what the site devs are trying to achieve (prioritizing across frame boundaries at the document and network level probably won't do anything for example).
Script, IMG and Link tag fetchpriority attributes (as well as fetch RequestInit) all still have very clear use cases though.
Reporter | ||
Comment 2•1 year ago
|
||
Here's an outline of what we need to do for this bug:
We need to add fetchpriority attributes to these DOM elements
img
link
script
requestInit
Then we need to update the loader functions to properly set the priority on resource channel that's created with NS_NewChannel
LoadImageWithChannel
Loader::LoadSheet
ScriptLoader::StartLoadInternal
FetchDriver::HttpFetch
These call sites should set priority in a similar way to:
beacon
For images we might have to set the priority
imgRequest::AdjustPriority call graph
imgRequestProxy::SetPriority call graph
Comment 3•1 year ago
|
||
FYI, we in the Chrome team have decided to stop confusing developers with two names for the one feature and so are going to try to use "Fetch Priority" going forward: https://twitter.com/tunetheweb/status/1648399924424237058?s=20.
Would be great if Firefox felt the same and we could be aligned on this.
Reporter | ||
Comment 4•1 year ago
|
||
https://fetch.spec.whatwg.org/#request-priority
https://html.spec.whatwg.org/multipage/urls-and-fetching.html#fetch-priority-attributes
Comment 5•10 months ago
|
||
Hello Henri. Can you please explain why certain HTML attributes are not listed in https://searchfox.org/mozilla-central/rev/d31e56f7b3c2c18b8071a7b2a2fb6b4e01e3d3e8/parser/html/javasrc/AttributeName.java#777-792 and its following lines? E.g. the "popover" attribute (https://html.spec.whatwg.org/#attr-popover) isn't there and others, like "crossorigin" are (https://searchfox.org/mozilla-central/rev/d31e56f7b3c2c18b8071a7b2a2fb6b4e01e3d3e8/parser/html/javasrc/AttributeName.java#1182). Asking because I'm inclined to add the "fetchpriority" attribute for the <script>
element (https://html.spec.whatwg.org/multipage/scripting.html#attr-script-fetchpriority), since it seems required for preolading URIs (https://searchfox.org/mozilla-central/search?q=symbol:_ZN7mozilla3dom12ScriptLoader10PreloadURIEP6nsIURIRK12nsTSubstringIDsES7_S7_S7_bbbbbNS0_14ReferrerPolicyEy&redirect=false).
Comment 6•10 months ago
|
||
Pre-interned names are merely an optimization (well, assumed to be an optimization) when the names are not special (i.e. the name has the usual flags). Therefore, things still work if an attribute isn't listed. IIRC popover
had a hash collision and was omitted for that reason.
Comment 7•9 months ago
|
||
Description
•