Page MenuHomePhabricator

Opensearch favicons must be smaller than 10 000 B, otherwise they're ignored
Open, LowPublic

Description

https://developer.mozilla.org/en-US/Add-ons/Creating_OpenSearch_plugins_for_Firefox says that

Remotely fetched favicons must not be larger than 10KB (see bug 361923).

Due to the age of the mentioned bug (since 2006-11-26) and since it seems that the limit of 10 000 B is intentional

intentionality putting a limit to the icon file to void the search.json file to turn too heavy

which both imply it's not going to be solved soon, we should provide either of following

  • smaller icons for favicon
  • separate icons for opensearch
  • dataURI encoded icons in opensearch modules

Event Timeline

Restricted Application added subscribers: Zppix, JEumerus, Matanya, Aklapper. · View Herald TranscriptMay 26 2016, 12:04 PM
The_RedBurn updated the task description. (Show Details)May 26 2016, 12:04 PM

Once added in Firefox

Thanks for reporting. What are the steps to "add it in Firefox" exactly, so someone else could try to reproduce the issue?

Here is how to do it: https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox#w_add-a-search-engine

The icons are shown correctly before we add the search engines. But once added, they change to a generic icon.

I see the default icon for wikinews but I can't seem to add the wikipedia search.

I see the default icon for wikinews but I can't seem to add the wikipedia search.

That's probably because it's included by default. You can go to a different wikipedia language to add it or remove it and add it back.

Okay... How do I get the English one back?

This part feels like a bug in Firefox.

You should be able to add it back by following the procedure in the link I've posted.
If not, at which point doesn't it work?

I suppose it's irrelevant to this bug but going to frwiki and adding the search there only gives you frwiki searching, you still can't add enwiki searching back.

Anyway I wonder if this might be https://bugzilla.mozilla.org/show_bug.cgi?id=361923
I downloaded both, and...
-rw-rw-r-- 1 alex alex 15086 Mar 14 18:08 wikinews.ico
-rw-rw-r-- 1 alex alex 2734 Mar 14 18:08 wikipedia.ico

Danny_B triaged this task as Lowest priority.May 26 2016, 4:29 PM
Danny_B added a subscriber: Danny_B.

Seems rather upstream problem of Firefox.

The search module contains the proper link to the icon which loads properly, thus there should not be an issue with that on WMF servers side...

Anyway I wonder if this might be https://bugzilla.mozilla.org/show_bug.cgi?id=361923
I downloaded both, and...
-rw-rw-r-- 1 alex alex 15086 Mar 14 18:08 wikinews.ico
-rw-rw-r-- 1 alex alex 2734 Mar 14 18:08 wikipedia.ico

The one I tested had 2,07 kB, so perhaps not...

Might be relevant to the recent HTTPS switchover - all engines I've checked have HTTP link to icon (or data URI)

@Krenair pls provide the link to upstream report, thx

Might be relevant to the recent HTTPS switchover

It seems unlikely. That was over a year ago. Would no-one have noticed for that long?

@Krenair pls provide the link to upstream report, thx

I posted it above

@Krenair pls provide the link to upstream report, thx

I posted it above

Therefore not - as I mentioned below it, I tested with small icon and it didn't work either, thus such report isn't obviously the relevant one.

Might be relevant to the recent HTTPS switchover

It seems unlikely. That was over a year ago. Would no-one have noticed for that long?

It depends... see T134869: Secure connection failed when attempting to send POST request using HTTP/2 (if connection has been idle for a certain time) (I forgot to add HTTP/2)

@The_RedBurn : Please provide browser and OS version, thanks.

Krenair moved this task from Reported Upstream to Backlog on the Upstream board.May 26 2016, 5:11 PM
The_RedBurn added a comment.EditedMay 26 2016, 7:41 PM

Anyway I wonder if this might be https://bugzilla.mozilla.org/show_bug.cgi?id=361923
I downloaded both, and...
-rw-rw-r-- 1 alex alex 15086 Mar 14 18:08 wikinews.ico
-rw-rw-r-- 1 alex alex 2734 Mar 14 18:08 wikipedia.ico

The one I tested had 2,07 kB, so perhaps not...

I think you mean this one: https://en.wiktionary.org/static/favicon/wiktionary/en.ico
Firefox says it's 2,07 KB, but if you save it to your disk, you'll see the real size is 14,7 KB. The size reported by Firefox isn't the full size (it's a multipart file).

An easy workaround for this Firefox bug would be to remove the 48x48 part for the Opensearch specific icon.
Currently, the Opensearch plugin uses the site favicon.

Reproduced with Firefox 46.0.1 on Windows 7.

The one I tested had 2,07 kB, so perhaps not...

I think you mean this one: https://en.wiktionary.org/static/favicon/wiktionary/en.ico
Firefox says it's 2,07 KB, but if you save it to your disk, you'll see the real size is 14,7 KB. The size reported by Firefox isn't the full size (it's a multipart file).

Aha! Therefore it will be the issue @Krenair linked (sorry, Alex ;-))

An easy workaround for this Firefox bug would be to remove the 48x48 part for the Opensearch specific icon.
Currently, the Opensearch plugin uses the site favicon.

That would require to have a pair of (fav)icons for each project (which is not only each family, since some projects have even their own, typically Wiktionaries...)

Danny_B renamed this task from Opensearch favicons are broken for Wiktionary, Wikibooks and others to Opensearch favicons must be smaller than 10 000 B, otherwise they're ignored.May 26 2016, 8:03 PM
Danny_B raised the priority of this task from Lowest to Normal.
Danny_B updated the task description. (Show Details)
Danny_B moved this task from Backlog to Reported Upstream on the Upstream board.
Aklapper lowered the priority of this task from Normal to Lowest.May 29 2016, 8:03 PM
Danny_B raised the priority of this task from Lowest to Low.May 29 2016, 9:03 PM

It's actually quite a big issue in presentation of WMF sites, so it definitely should not be Lowest. Raising at least to Low, but IMO it deserves Normal.

@Danny_B: I don't see anything in the MediaWiki-extensions-OpenSearchXml code base related to this task. Could you elaborate why you added that project?

Relict of switching between tabs. Originally intedned that one, but after finding out details about it, I switched to MediaWiki-General. IDK why it didn't save properly. Fixed. Thanks.

Torana added a subscriber: Torana.Aug 29 2016, 8:20 AM

Firefox rejecting externally loaded favicons larger than 10 kB seems to be deliberate on Firefox’s part (https://developer.mozilla.org/en-US/Add-ons/Creating_OpenSearch_plugins_for_Firefox). Many OpenSearch plugins available from the Firefox add-ons website solve the problem by encoding the icon in Base64 format within the file.