When href is missing from a preload link it ignores imagesrcset
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: derekmj74, Assigned: firefox)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:90.0) Gecko/20100101 Firefox/90.0
Steps to reproduce:
I've shortened the image names but apart from that I used this HTML:
<link rel="preload" imagesrcset="small.jpg 100w, medium.jpg 500w, large.jpg 1000w" imagesizes="100vw" as="image">
Actual results:
The image did not preload.
Expected results:
I think this line "One or both of the href or imagesrcset attributes must be present." from https://html.spec.whatwg.org/multipage/semantics.html#the-link-element means the href can be absent and the preloading will still work. I tested in Chrome and Edge and it works there.
In Firefox I have to use an empty href i.e. href="", which the spec disallows if I'm reading it right.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 2•2 years ago
|
||
This might be a rather simple bug to fix.
Comment 3•2 years ago
|
||
Yeah..perhaps Document::ResolvePreloadImage needs to be tweaked? Still an S3 I believe
Comment 5•3 months ago
|
||
Updated•3 months ago
|
I noticed D285549 is still a WIP. I've been working on this too, and my patch also covers the speculative parser path (nsHtml5TreeBuilderCppSupplement.h), which handles preloads during initial HTML parsing. Happy to collaborate, or have both reviewed together.
Comment 10•2 months ago
|
||
| bugherder | ||
Updated•2 months ago
|
Updated•2 months ago
|
Description
•