Skip to content

Keep looking for a favicon when the home page can't be read - #5422

Open
dave-atx wants to merge 1 commit into
Ranchero-Software:mainfrom
dave-atx:favicon-home-page-fallback
Open

dave-atx wants to merge 1 commit into
Ranchero-Software:mainfrom
dave-atx:favicon-home-page-fallback

Conversation

@dave-atx

@dave-atx dave-atx commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

fixes #5421

When a home page can't be read, FaviconDownloader never tries the one favicon candidate that doesn't need its HTML. findFaviconURLs returns nil whenever cachedMetadata does, and searchForFavicon then waits for .htmlMetadataAvailable. If the fetch failed and there's no stale record, that notification never comes, so the feed has no favicon for as long as the failure record lasts (11 days after a 4xx). scheme://host/favicon.ico needs no HTML.

cachedMetadata returns nil in two situations: the download is still in flight, or it isn't coming. Only the first is worth waiting for. HTMLMetadataDownloader now tracks the second and answers metadataIsUnavailable(for:), posting .htmlMetadataAvailable so existing observers re-query. A search started that way tries only favicon.ico. checkForNewFaviconURL doesn't use the guess, since it would otherwise replace a saved, declared favicon with favicon.ico.

Sync accounts feel this most. Miniflux, Feedly, ReaderAPI and local accounts never set faviconURL (it's JSON-Feed-only), so the home page is their only route to a favicon.

I rebased this onto the new icon code, which made it a lot smaller. The per-home-page FaviconSearch already fixes the shared currentHomePageHasOnlyFaviconICO flag the earlier version also fixed. The faviconCandidates function and the test target are gone along with it.

findFaviconURLs returns nil whenever cachedMetadata does, and searchForFavicon
then waits for .htmlMetadataAvailable. When the home page fetch fails and
there's no stale record, that notification never comes, so the feed gets no
favicon at all -- for as long as the failure record lasts, 11 days after a 4xx.
But the last candidate, scheme://host/favicon.ico, needs no HTML to find.

cachedMetadata returns nil in two different situations: the download is still
in flight, or it isn't coming. Only the first is worth waiting for.
HTMLMetadataDownloader now tracks the second and answers metadataIsUnavailable,
posting htmlMetadataAvailable so existing observers re-query. A search started
that way tries only favicon.ico. checkForNewFaviconURL doesn't use the guess,
since it would otherwise replace a saved, declared favicon with favicon.ico.

Sync accounts feel this most, since Miniflux, Feedly, ReaderAPI and local
accounts never set faviconURL -- it's JSON-Feed-only -- so the home page is
their only route to a favicon.

Written with help from Claude Code.
@dave-atx
dave-atx force-pushed the favicon-home-page-fallback branch from f9bebe0 to 531d3af Compare November 8, 2026 23:21
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.

A feed loses its favicon for good when its home page's HTML metadata fetch fails

1 participant