Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not provide a valid apple-touch-icon #11458

Closed
GlenKPeterson opened this issue Sep 18, 2020 · 12 comments · Fixed by #14243
Closed

Does not provide a valid apple-touch-icon #11458

GlenKPeterson opened this issue Sep 18, 2020 · 12 comments · Fixed by #14243

Comments

@GlenKPeterson
Copy link

GlenKPeterson commented Sep 18, 2020

The Apple documentation says:

"To specify an icon for the entire website (every page on the website), place an icon file in PNG format in the root document folder called apple-touch-icon.png"
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

Why do I then also have to add <link rel="apple-touch-icon" href="/apple-touch-icon.png"> to my home screen?

I like that Apple follows the "convention-over-configuration" rule here. Also, I'm always looking for ways to specify less in my HTML, JSON, and JS files for speed.

Thank you very much for Lighthouse! I love tools that let me pass tests to ensure compatibility! Lighthouse, mail-tester, ssl-labs. These are all great tools!

@connorjclark

This comment has been minimized.

@jespertheend

This comment has been minimized.

@GlenKPeterson

This comment has been minimized.

@GlenKPeterson

This comment has been minimized.

@jespertheend
Copy link

I'm not aware of any bug in iOS. As far as I know iOS has always looked for an apple-touch-icon.png in the root dir of a server when no tag was specified.

@connorjclark
Copy link
Collaborator

Thanks @GlenKPeterson & @jespertheend for explaining, I didn't fully understand the issue before.

We need to discuss if we think it worth it to make an additional request for every run for this resource (or; the resource as defined in the HTML, if the page doesn't want to use the default) just for ios PWA. We may otherwise decide to move this audit to "manual", which means we do nothing but list it as a thing that exists.

@jespertheend
Copy link

Manual sounds good enough for me, an extra request would be nice to have though.
It felt weird to see an error for something that I was pretty sure I had done correctly.

@paulirish
Copy link
Member

paulirish commented Nov 10, 2020

For correctness, I think we do have to end up making the request. People who do it this way are saving some HTML bytes and that's nice.

We'll use the fetcher for this.

related: new audit: have a valid favicon.ico · Issue #10402

@keganlance
Copy link

We only have to make the request when it's not listed as meta tag in the head.

Keep in mind the apple-touch-icon meta tag can also be injected using JS and apple will pick it up and use it.

In any case, doing this request is very welcome as to provide the best experience on each device, there are 20 icons to include, which would otherwise have to all be defined in the html, since apple prefers the meta tag over files it finds with requests. This is the full list:
apple-touch-icon.png
apple-touch-icon-57x57-precomposed.png
apple-touch-icon-57x57.png
apple-touch-icon-60x60-precomposed.png
apple-touch-icon-60x60.png
apple-touch-icon-72x72-precomposed.png
apple-touch-icon-72x72.png
apple-touch-icon-76x76-precomposed.png
apple-touch-icon-76x76.png
apple-touch-icon-114x114-precomposed.png
apple-touch-icon-114x114.png
apple-touch-icon-120x120-precomposed.png
apple-touch-icon-120x120.png
apple-touch-icon-144x144-precomposed.png
apple-touch-icon-144x144.png
apple-touch-icon-152x152-precomposed.png
apple-touch-icon-152x152.png
apple-touch-icon-180x180-precomposed.png
apple-touch-icon-180x180.png
apple-touch-icon-precomposed.png

So yeah, by doing this we can save 20 metatags.

@Seirdy
Copy link

Seirdy commented Mar 22, 2022

Might be worth updating this audit to instead not impact the score, since Safari 15.4 supports Web App Manifest icons.

Once older versions of Safari dwindle, the audit can be removed; this will become a proprietary non-essential feature.

@connorjclark
Copy link
Collaborator

Thanks for sharing the news! Let's go ahead and delete this audit for 10.0, we don't need to waste people's times with this since the compatibility problem will disappear soon.

@Seirdy
Copy link

Seirdy commented Jun 14, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants