Adding a favicon to stop a 404 on every page load
What happened
None of the pages on the site had a rel="icon" link. When a page doesn't declare an icon, browsers fall back to requesting /favicon.ico from the site root. We didn't have one, so every page load produced a 404.
That showed up in three ways: an error in the console and network tab, a hit in the best-practices audit, and no icon in the browser tab.
The fix
I added a single SVG file to the static assets folder and put a rel="icon" link to it in every HTML page. Some pages come from page generator scripts. I added the link to those too, so regenerating pages wouldn't bring the problem back.
The change was made as an automated edit, and it was kept.
Why it works
Browsers only guess at /favicon.ico when the page gives them no other information. An explicit icon link tells them where to look, so the guess never happens and the 404 goes away. SVG is a fine format for this: one small file, no separate sizes to produce.
Putting the link in the generators matters as much as the edit to the existing pages. Fixing only the generated output would have been undone the next time the generators ran.
To check the result, I searched the HTML pages for any that lacked the icon link. None of the more than a hundred pages were missing it, and the favicon file is present. The large test suite also passes. I didn't load pages in a browser to look at the network tab, so the end result of "no more 404" follows from the markup check rather than a separate request log.