`<link rel="preload" as="audio" ...>` and other potential destinations aren't preloaded
Categories
(Core :: Networking, defect, P2)
Tracking
()
People
(Reporter: mbrodesser-Igalia, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [necko-triaged])
STR: open https://jsfiddle.net/toy5k3p6/
Expected: in devtool's "Network" tab, a request to "test.wav." should be shown.
Actual: no such request is shown.
As a sanity check, preloading a script ("x.js") is shown in the "Network" tab.
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Comment 1•1 year ago
|
||
as="audioworklet"
also sends no request.
Reporter | ||
Comment 2•1 year ago
|
||
as="document"
also not.
Reporter | ||
Comment 3•1 year ago
|
||
as="embed"
also not.
Comment 4•1 year ago
|
||
I would suggest you look at the source code, which would make it obvious what is actually supported: https://searchfox.org/mozilla-central/rev/fd2325f5b2a5be8f8f2acf9307285f2b7de06582/uriloader/preload/PreloadService.cpp#135-212
Reporter | ||
Comment 5•1 year ago
|
||
(In reply to Tom Schuster (MoCo) from comment #4)
I would suggest you look at the source code, which would make it obvious what is actually supported: https://searchfox.org/mozilla-central/rev/fd2325f5b2a5be8f8f2acf9307285f2b7de06582/uriloader/preload/PreloadService.cpp#135-212
Thanks, that's helpful.
Reporter | ||
Comment 6•1 year ago
|
||
Be aware that MDN claims Firefox offers full support: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload#browser_compatibility.
Reporter | ||
Comment 7•1 year ago
|
||
Filed https://github.com/mdn/browser-compat-data/issues/20824 to update MDN.
Reporter | ||
Comment 8•1 year ago
|
||
Btw, non-potential destinations (e.g. "audioX") lead to a warning in the developer console:
"Preload of https://fiddle.jshell.net/_display/test.wav was ignored due to unknown “as” or “type” values, or non-matching “media” attribute."
No warning for "audio".
Reporter | ||
Comment 9•1 year ago
|
||
It would be helpful to warn in that case too.
Reporter | ||
Comment 10•1 year ago
|
||
(In reply to Tom Schuster (MoCo) from comment #4)
I would suggest you look at the source code, which would make it obvious what is actually supported: https://searchfox.org/mozilla-central/rev/fd2325f5b2a5be8f8f2acf9307285f2b7de06582/uriloader/preload/PreloadService.cpp#135-212
Btw., part of the confusion stems from https://searchfox.org/mozilla-central/rev/431bcb0e88e49b92c6913c0916c7ad15e8a4875c/dom/webidl/Request.webidl#71-76.
Updated•1 year ago
|
Comment 11•6 months ago
|
||
https://wpt.live/fetch/api/request/destination/fetch-destination.https.html has some tests involving <link as=>
The parsing only seems to support a subset of allowed as values:
Description
•