GNOME Bugzilla – Bug 696726
Be way smarter about picking web app icons
Last modified: 2016-11-11 16:53:29 UTC
forecast.io has the following: <link rel="apple-touch-icon-precomposed" href="images/icons/54.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/icons/72.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/icons/114.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/icons/144.png"> We were only picking 54.png.
As far as I can see the code is fetching only the first image in the list.
Seems that we don't have in the dom bindings access to the sizes attribute. For whatever reason this property is made JS only in WK: #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT [Custom] attribute DOMSettableTokenList sizes; #endif
From https://bugs.webkit.org/show_bug.cgi?id=37674#c30 "This uses a custom binding which doesn't seem needed. Please file a new bug to not use custom bindings and/or add GTK custom bindings." I don't see any way to properly (other than sniffing the href) to get the best icon if we don't have access to this attribute.
Ok filed https://bugs.webkit.org/show_bug.cgi?id=125775
(In reply to comment #4) > Ok filed https://bugs.webkit.org/show_bug.cgi?id=125775 Fixed now
*** Bug 702857 has been marked as a duplicate of this bug. ***
I added some FIXMEs in the code (ephy-web-dom-utils.c) with links to some articles about how to go about picking good icons. We're making a token effort to look up Windows 8 and Apple Touch icons, but missing most. The file size could be in the name of the icon, or the icons could just be present at the root of the site and not in the DOM at all (we should check, but we don't).
Here is a collection of icon discovery mechanisms. The list is sorted by recognized standards first … : * <link rel="icon" sizes="any" href="icon.svg"> * <link rel="icon" sizes="256x256 128x128 32x32" href="icon.ico"> * <link rel="icon" sizes="256x256" href="icon.png"> … followed by defacto standards: * Request /apple-touch-icon.png and see if you get an image response† * <link rel="apple-touch-icon" href="/apple-touch-icon.png"> * Request /browserconfig.xml and find a list of tileImages there‡ * <meta name="msapplication-tileImage" conent="/msapplication.png"> † Works as you would with /favicon.ico. There are many more websites using this than including the link element in HTML; including Apple.com. This is method is the current recommendation by Apple. ‡ Current Microsoft recommendation. Both iOS and Windows 8/10 only does the extra icon-discovery requests when a user chooses to bookmark or pin a website to their home/start screens.
Hey Daniel, can I mark this bug as a duplicate of bug #767257? Is there anything else we should do here that you didn't already take care of in that bug? I know we still have a couple FIXMEs in the code, but they seem relatively minor now and I don't think we need an open bug to track FIXMEs.
Michael Catanzaro, yes. Mark it a duplicate.
*** This bug has been marked as a duplicate of bug 767257 ***