Repository navigation
fix(favicon): don't treat rel=alternate links as favicon candidates - #2680
Merged
Mzack9999 merged 1 commit intoOct 23, 2026
Merged
Conversation
rel="alternate" marks RSS/Atom feeds and hreflang translations. Each one was fetched as a possible favicon, and two failed fetches end the search, so pages with two unreachable alternates never got their real icon hashed. "alternate icon" still matches through its "icon" token.
Mzack9999
reviewed
Oct 23, 2026
Mzack9999
left a comment
Member
There was a problem hiding this comment.
The extra fetches are real. rel=alternate is a feed or a translation, and two of those failures stop HandleFaviconHash before the real icon. The new test fails on dev by also returning /feed.xml and the hreflang URL, and it passes once alternate is dropped. rel="alternate icon" still matches through the icon token. Linked #2683.
CI had not run because the workflows were waiting on a first-time contributor approval.
Mzack9999
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2683
What
extractPotentialFavIconsURLstreats any<link rel="alternate">as a favicon candidate. That rel marks RSS/Atom feeds and hreflang translations, not icons. This PR dropsalternatefrom the token list.rel="alternate icon"still matches through itsicontoken.Why it matters
Each alternate link is fetched as a possible favicon. After two network failures
HandleFaviconHashstops looking, so a page whose hreflang links point to unreachable hosts never gets its real icon hashed. Repro page served on127.0.0.1:18432:On
dev, the server log shows only/,/http://127.0.0.1:1/de/and/http://127.0.0.1:1/fr/;/icon.pngis never requested. Even when the icon is eventually found, every feed or translation link costs one extra request per target.Test
TestExtractPotentialFavIconsURLs_IgnoresAlternateLinksfails ondev(returns/feed.xmland the hreflang URL as candidates) and passes with the fix.go test ./runner/passes.AI disclosure
I used Claude Code to help read the code and draft the test. I reproduced the bug against a local server and checked the before/after output above myself.
Summary by CodeRabbit
alternate, while continuing to recognize links with icon-related markers.