Website shortcuts ignore favicons configured in website markup

REPRODUCIBILITY: 100%
OS VERSION: 4.4.0.64
HARDWARE: Xperia XA2
UI LANGUAGE:
REGRESSION: Yes, against 4.3.0.12

DESCRIPTION:

A regression spotted against previous release 4.3.0.12 with older browser code base. The website designated favicons (either link[rel=icon,apple-touch-icon], or other non standard link[rel=apple-touch-icon], meta[name=msapplication-TileImage], etc.) are ignored by the browser when creating website shortcuts in the application drawer.

PRECONDITIONS:

STEPS TO REPRODUCE:

  1. load a webpage (ie. https://jakdojade.pl) in the browser
  2. select Menu \ Add to application drawer
  3. go to Application drawer

EXPECTED RESULT:

Website icon used by the website shortcut

ACTUAL RESULT:

Generic icon of a white star on a blue globe used for every website.

4 Likes

I don’t think they’re ignored, but there is an issue. If you bookmark the site you will see the correct icon (if its specified by the web site) on the bookmark screen. If you then click on that icon on the bookmark screen and ‘add to app grid’ from the conrext menu, then you get the correct icon on the app grid. But if you do it directly from the web browser pop-up menu, rather than via the bookmsrk screen, then you aleays get the blue globe as you say.

2 Likes

I can confirm that it works as expected in the scenario described by you. Now I have to admit, you have made me wonder whether I used the straight scenario (see scrot below) and not the bookmark export steps as you gave. So it might not be a regression after all, perhaps.

The left shortcut has been created in the older version, the other one in a repro attempt:
zrzut

Well, I don’t know if it is supposed to work like I described, but I wouldn’t have thought so - the correct operation must be that whichever way you do it you always end up with the proper icon on the app grid. So you are right I believe, there is a bug here.

1 Like

Thanks for the trick. Not vital but always more pretty and easy to have the right icons.

Confirming (XA2, 4.4.0.64): So yes, The browser doesn’t add shortcuts to appgrid with the correct icons.

Both launchers should be stored in ~/.local/share/applications/.desktop.
Can you share the contents of these files?

They differ in the value of Icon attribute. The older shortcut with custom icon sports data URL with base64 encoded (8297 bytes long) data of a PNG image, while the latter barely says Icon=icon-launcher-bookmark.

2 Likes

Is that the only difference?
Looks like the software “consciously” decided to do that - either it doesn’t want to bother with favicons anymore, or it somehow fails retrieving one and falls back to icon-launcher-bookmark .
Have you tested this with other websites, is the behaviour consistent?
HAve you looked at the journal? Maybe something gets logged during shortcut creation?
The best way is to issue devel-su journalctl -f, then reproduce the problem. Or maybe Firefox even logs something itself, idk.

I only ever tried adding an icon to the launcher on 4.4.0.58 so I didn’t even know about this feature :smiley:

But; confirming; the generic icon is used when adding the launcher item from the page via the menu, and the favicon is used when adding from the bookmarks view.

Yes, I have 3 shortcuts now. The old one does not differs from the one created of a bookmark in the new browser version.

I spotted it creating a shortcut from another website. The one I use in the repros was chosen for the report, because I have already had a shortcut to compare against.

it’s a known issue reported by me some time ago https://github.com/sailfishos/sailfish-browser/issues/952

2 Likes

Thanks for the report @smyru, and for the report on github @atlochowski.

I’ve created an internal but report and marked this here as “tracked” so at least now all of the pieces tie together, and if there are updates we’ll do our best to note them here too.

1 Like

You also made a bug report here, at forum. :wink:

It’s annoying that this doesn’t work as intended.

I suspect it depends heavily on how the website itself links to its favicon.
I just created two shortcuts*, they both use an URL link to the favicon.
If the favicon was base64-encoded straight into the HTML I suspect the shortcut would contain that instead.

The URL link is error prone - it can change, or internet can be off or too slow on your phone etc.

All I can recommend:

  • use these shortcuts sparingly (prefer in-browser bookmarks)
  • the ones you must use: download the icon and put an absolute path in the Icon= field of the .desktop file

* via the browser menu when visiting the site. When I create from a browser bookmark, the Icon is base64-encoded inside the .desktop file.