[BrowserAPI] Selecting the right quality for icons

RESOLVED DUPLICATE of bug 1041482

Status

()

Core
DOM
RESOLVED DUPLICATE of bug 1041482
3 years ago
3 years ago

People

(Reporter: karlcow, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
It seems there is an issue with the current implementation. This has been triggered by the Bug 921014.


So I decided to create a test page with all the possible icons, to see what was requested when a user select  "Add to Homescreen" on Firefox OS. For the purpose of the test it is not mandatory to have the actual icons, just different URIs to see what is requested.


  <link rel="shortcut icon" href="/favicon.ico">
  <link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-touch-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-touch-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-touch-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-touch-icon-144x144.png">
  <link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-touch-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-touch-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-touch-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-touch-icon-152x152.png">
  <link rel="icon" type="image/png" href="/favicon/favicon-196x196.png" sizes="196x196">
  <link rel="icon" type="image/png" href="/favicon/favicon-160x160.png" sizes="160x160">
  <link rel="icon" type="image/png" href="/favicon/favicon-96x96.png" sizes="96x96">
  <link rel="icon" type="image/png" href="/favicon/favicon-16x16.png" sizes="16x16">
  <link rel="icon" type="image/png" href="/favicon/favicon-32x32.png" sizes="32x32">


1. Then I requested the page, 
2. Click on the star
3. 'Add to the home screen'
4. Finalized.

In my server log I noticed that the lowest resolution was requested and by chance it was the last one.

*.*.*.* - - [29/Jul/2014:23:16:01 -0400] "GET /favicon/favicon-32x32.png HTTP/1.1" 404 636 "-" "Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0"

So I reordered to double test and put as the last choice.

  <link rel="icon" type="image/png" href="/favicon/favicon-160x160.png" sizes="160x160">

And this time it requested… (drums)

*.*.*.* - - [29/Jul/2014:23:26:52 -0400] "GET /favicon/favicon-160x160.png HTTP/1.1" 404 636 "-" "Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0"

So even if someone provides a good quality icon it's not necessary the right one which is being selected, but just the last one in the list.

This is a bug.
This isnt down to the browser api but part of the responsibility of where those icons are displayed, theres a series of bugs most of which have landed to enable this, the final integration has not been done however, we are tracking the feature as a whole in 1041482
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1041482
(Reporter)

Comment 2

3 years ago
Dale, what do you mean by

> "responsibility of where those icons are displayed"

Do you mean The piece of software which will have to use one of these icons?
So you are saying that the "Add to HomeScreen" is not part of Firefox?

Btw there is a similar issue in Firefox for Android. It download this time the big size and the favicon, but use the favicon for the homescreen.

Comment 3

3 years ago
Right now we just choose the last icon injected into the DOM, we haven't implemented choosing the best icon at all.
> Do you mean The piece of software which will have to use one of these icons?
> So you are saying that the "Add to HomeScreen" is not part of Firefox?

The 'Browser API' usually refers to mozbrowser of which the functionality needed is implemented, for the final functionality to work we need to hook the work into the search app and various places inside gaia  where we can create a homescreen bookmark, that is being tracked in https://bugzilla.mozilla.org/show_bug.cgi?id=1042730

Comment 5

3 years ago
(In reply to :Ehsan Akhgari (not reading bugmail, needinfo? me!) from comment #3)
> Right now we just choose the last icon injected into the DOM, we haven't
> implemented choosing the best icon at all.

Dale, what bug tracks this? ^
Flags: needinfo?(dale)
 https://bugzilla.mozilla.org/show_bug.cgi?id=1042730
Flags: needinfo?(dale)
You need to log in before you can comment on or make changes to this bug.