Open Bug 1797715 Opened 2 years ago Updated 19 hours ago

[meta] Fetch Priority (was Priority Hints)

Categories

(Core :: Networking, task, P3)

task

Tracking

()

People

(Reporter: valentin, Unassigned)

References

(Depends on 10 open bugs, Blocks 1 open bug, )

Details

(4 keywords, Whiteboard: [necko-triaged])

No description provided.
Blocks: 1584663

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.

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

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.

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.

Flags: needinfo?(hsivonen)
Depends on: 1865040
Depends on: 1866282
Depends on: 1860336
Depends on: 1866314
No longer depends on: 1860336
Depends on: 1877152
Depends on: 1878831
Depends on: 1878895
Depends on: 1879335
Depends on: 1880433
Depends on: 1880528
Depends on: 1881040
Depends on: 1882084
Depends on: 1882548
Depends on: 1892734
You need to log in before you can comment on or make changes to this bug.