Skip to content

rel="icon" requests do not fire since it doesn't translate to a valid preload destination #11726

@TimvdLippe

Description

@TimvdLippe

What is the issue with the HTML Standard?

Links with rel="icon" run the default fetch and process the linked resource. The first step is to create link options from element where the destination is the result of translating a preload destination. The second step then creates a link request.

When creating a link request, since "icon" is not a valid destination as preload destination, its destination is null. Therefore, it states "If options's destination is null, then return null.".

Step 3 of "default fetch and process the linked resource" then states "If request is null, then return." and nothing happens.

Step 5 of "default fetch and process the linked resource" does call into icon resource fetch steps which does set the destination to Image, but at that point it is too late since we already bailed out at step 3.

Servo ran into this when correctly returning null when computing the preload destination (servo/servo#39549).

Should step 2 of https://html.spec.whatwg.org/multipage/semantics.html#create-a-link-request instead be "If options's destination is null, then set options's destination to the empty string"? If I make that change in Servo, the previous WPT failures (servo/servo#39549 (comment)) pass once again.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions