Open Bug 1855388 Opened 1 year ago Updated 4 months ago

`<link rel="preload" as="audio" ...>` and other potential destinations aren't preloaded

Categories

(Core :: Networking, defect, P2)

defect

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.

Summary: `<link rel="preload" as="audio" ...>` doesn't preload → `<link rel="preload" as="audio" ...>` and other potential destinations aren't preloaded

as="audioworklet" also sends no request.

as="document" also not.

as="embed" also not.

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

(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.

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".

It would be helpful to warn in that case too.

(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.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
See Also: → 1902212
See Also: → 1886145
You need to log in before you can comment on or make changes to this bug.