w3c / w3c-website

W3C Website feedback and bug reports
https://www.w3.org/
240 stars 80 forks source link

How to deal with favicon? #650

Open deniak opened 1 month ago

deniak commented 1 month ago

Describe the issue Nowadays, browsers systematically try to fetch a favicon when loading pages. If no icon link tag is provided (see below), then the browser try to look for one at the root of the website which may result in a 404 if it doesn't exists (might be the case for some sub domains).

<link rel="shortcut icon" href="https://www.w3.org/favicon.ico">

The different templates in the design system don't include that icon link but it's probably good to add it even if the favicon exists at the root of w3.org. So even if the template is used outside www.w3.org (github.io, different subdomain, etc), we would still have the good W3C favicon.

vivienlacourba commented 1 month ago

A concrete example is the authentication portal which uses the new W3C style but at a different domain https://auth.w3.org/

@simonrjones any specific recommendation for favicon or can we simply add the above line to the website template?

simonrjones commented 3 weeks ago

hi @vivienlacourba yes I agree that is worth adding. The example HTML added by @deniak looks perfect to me.

If possible, can you add an icon for Apple, iOS uses a custom link rel type. Example:

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">