profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Put infrastructure in place so that we don't need to request favicons when loading a profile

Open julienw opened this issue 7 years ago • 7 comments

Currently we load favicons by computing the favicon URL from the library URL. The consequences is 1/ that the favicon is the library domain's favicon, not the tab's favicon, and 2/ that we request the favicon when the user loads a profile.

Different ways to do this:

  • stop displaying icons altogether
  • replace the favicons by an icon showing where the frame comes from (eg: gecko / web content / js / native)
  • fetch the favicons from the addon and put them in the profile
  • fetch the tab's icons from the addon and put them in the profile

┆Issue is synchronized with this Jira Task

julienw avatar Apr 20 '18 15:04 julienw

cc @arroway

julienw avatar Mar 28 '19 16:03 julienw

Here is a profile exhibiting some favicons: http://bit.ly/2THV3f0

julienw avatar Mar 28 '19 16:03 julienw

@julienw could you provide some context here? I'm not sure why we want to change the behavior here.

gregtatum avatar Mar 29 '19 19:03 gregtatum

@gregtatum As a reminder, currently we compute the favicon's URL by using the library URL's domain and adding favicon.ico. Then we load this icon. This has several drawbacks:

  • the most important IMO is that we do a request to the website itself. I believe this is a privacy issue, because anybody who loads a profile will basically ping all library websites. Here is an example when loading a profile capturing the CNN load: favicons for a CNN load
  • another issue is that we get the favicon for the library's domain, not for the tab that was running the content. But maybe that's what we want?
  • lastly not all domains use favicon.ico for their favicons -- a good example is the gecko profiler itself: our favicon is defined in a tag in our index.html

That's why I think we should capture them at capture time and put them as data url in the profile data.

julienw avatar Apr 01 '19 12:04 julienw

Ah makes sense, so we'll need a Gecko patch?

gregtatum avatar Apr 04 '19 22:04 gregtatum

Ah yeah, for sure!

julienw avatar Apr 05 '19 07:04 julienw

When we'll integrate the addon in Firefox, we can hook into https://searchfox.org/mozilla-central/source/browser/modules/FaviconLoader.jsm#497.

julienw avatar Apr 25 '19 14:04 julienw