Skip to content

Poll for the favicon if it doesn't exist on page load - #84

Merged
niklasbaumgardner merged 4 commits into
mainfrom
bug-2048421-fetch-favicons-if-not-exist-yet
Jul 2, 2026
Merged

Poll for the favicon if it doesn't exist on page load#84
niklasbaumgardner merged 4 commits into
mainfrom
bug-2048421-fetch-favicons-if-not-exist-yet

Conversation

@niklasbaumgardner

Copy link
Copy Markdown
Collaborator

I unfortunately had to remove the extension from the favicon bucket name in this patch.
But I think this provides a better experience.

@niklasbaumgardner
niklasbaumgardner requested a review from a team as a code owner June 23, 2026 18:36

@jaredhirsch jaredhirsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R+ with comments - I've added comments inline for the narrowest possible fixes needed to get the current approach working. Making these changes should be enough to land.

Another approach to consider: we could reduce network traffic by doing the polling at the share page level, not the individual link item level. This would take us from N independent polling loops down to 1. Reducing network traffic reduces server load, but more importantly, reduces battery and data usage on the mobile web. That said I don't think it's strictly necessary to make this change for this service right now--up to you.

Comment thread static/components/moz-share.mjs Outdated
Comment thread static/components/moz-share.mjs Outdated
Comment thread static/components/moz-share.mjs Outdated
…s to share object to reduce number of requests to server
@niklasbaumgardner

Copy link
Copy Markdown
Collaborator Author

Another approach to consider: we could reduce network traffic by doing the polling at the share page level, not the individual link item level. This would take us from N independent polling loops down to 1. Reducing network traffic reduces server load, but more importantly, reduces battery and data usage on the mobile web. That said I don't think it's strictly necessary to make this change for this service right now--up to you.

I ended up just implementing this because it's a good idea. The share object now sends 1 request with all of the urls that need a favicon. The backend takes the urls and returns a dictionary of hostname -> favicon_url

@niklasbaumgardner
niklasbaumgardner merged commit 86a4a76 into main Jul 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants