Open Bug 1249808 Opened 8 years ago Updated 2 days ago

Use larger site icons for web notifications, if available

Categories

(Core :: DOM: Notifications, task)

task

Tracking

()

People

(Reporter: canuckistani, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

We landed bug 1225543 to include favicons, but one comment so far is that they look bad / are low resolution. Some sites have higher resolution images we could use, that may be discoverable via various perhaps hacky techniques.

The purpose of this bug is to at least evaluate what the benefit would be of attempting to discover larger images. I'm needinfo'ing Bill because we discussed this briefly in a meeting and he had a list off the top of his head of the various (psuedo-?)standard ways larger/mobile-friendly icons get exposed on sites.
The problem isn't knowing how to get the larger favicons as we know many things we could do better at, it's getting the favicon service to use these things. We don't even store images larger than 1KB in the database and I've had interns work on this for two summers but it always ends up getting blocked on *potential* performance issues with storage. I really think we need to fix bug 492172 and dependencies then we get the benefits everywhere throughout Firefox UI. It's not really that hard but it never gets worked on.

Also note that if you are on OS X you may be seeing bug 1247390 which we waited over a month for platform to help with but so far there was silence.
Component: DOM: Push Notifications → Notifications and Alerts
Product: Core → Toolkit
See Also: 876700
Summary: We should try to use larger icons if sites have them → Use larger site icons for web notifications, if available
See Also: 12255431224785
Matt: excellent summary of the issues, really helps. We should discuss more in the weekly meeting.
Bug 492172 is also on the list of the Places perf/quality issues that the search team plans to work on, but not on the top-5. Of course this isn't to say that we wouldn't be thrilled to see it done sooner by someone else!
Bug 1283825 added a `page-icon:` protocol that should be perfect for XUL alerts. IIUC, we'll still need to use `GetFaviconDataForPage` for the OS X and libnotify backends.
We are not yet storing the biggest icons around (that will happen in bug 1352459) but you can already use page-icon or the favicons APIs to request an icon of the wanted size (page icon supports a #size=NN ref, the API has an argument for that). PlacesUtils.urlWithSizeRef(window, href, size) can be used to append a proper ref fragment based on the window dpi settings and your pixel requirements.
The API does its best to satisfy the required size, but if an icon of the requested size doesn't exist, it may return a smaller or a bigger one (or even an SVG) so you should set an image size in xul.

As I said we are not yet storing rich icons, but we already lifted all the limits on the icons we are currently collecting, so it's plausible some of the icons will already be as large as expected.
Depends on: 1352459
(note in the future we may evaluate to always return an icon of the requested size, and in case the icon is smaller we could fill up the space with a dominant color, this is all TBD)
Severity: normal → S3
Component: Notifications and Alerts → DOM: Notifications
Product: Toolkit → Core
Type: defect → task
Component: DOM: Push Subscriptions → DOM: Notifications
You need to log in before you can comment on or make changes to this bug.