vueuse/head

Merging favicon `link` tags

Closed this issue · 2 comments

Right now, "favicon" link attributes are not merged/overridden without setting key. It would be great DX if that'd be the case automatically.

Reproduction: Nuxt3 + StackBlitz

Expectation: On rel="shortcut icon" tag (same for just "icon" or also apple-version of it).

Actual:
image

Hey @manniL

Thanks for the suggestion. This would be fairly straight forward but I'm not too sure about it.

MDN says

If there are multiple <link rel="icon"'s, the browser uses their media, type, and sizes attributes to select the most appropriate icon. If several icons are equally appropriate, the last one is used. If the most appropriate icon is later found to be inappropriate, for example because it uses an unsupported format, the browser proceeds to the next-most appropriate, and so on.

Also see:

The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore.

https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types

So if someone is using multiple icons thinking that the most appropriate one will be selected, it may cause issues.

Thoughts?

Uhh, very good point! Closing here then, thank you ☺️