The 16-Pixel File That Every Browser Still Fetches First
Archi4 min read
Contents
- One Request, Every Visit
- 1999: A picture for the Favorites menu
- 2001: The default becomes the contract
- 2005: The link tag splits the decision
- 2010: A cookie that was not a cookie
- 2014 to 2021: Partitioning, slowly
- 2019: SVG, dark mode, and a media attribute
- The tab strip keeps its own rules
- What to check on your own site
One Request, Every Visit#
For years, one of the most common lines in any web server access log was a request for a file the site owner never created: /favicon.ico. It arrived with the first page load, usually answered with a 404. The file was 16 by 16 pixels, and the original format allowed 16 colors. It is the smallest asset in browser history, and it has outlasted nearly every feature shipped alongside it.
1999: A picture for the Favorites menu#
Internet Explorer 5 shipped in March 1999 with small icons next to bookmarked sites in the Favorites list. To draw them, the browser needed a picture before the page had fully loaded, so the team fixed a location: the site root, named favicon.ico. This was a convenience for a bookmark menu. Nobody wrote it into a standard, and nobody filed it as a public interface. That is the whole origin.
2001: The default becomes the contract#
Because the location was fixed, other engines copied it. A convention with no specification behind it became an expectation. Each browser shipped the same fallback: if the markup declares no icon, request /favicon.ico and see what comes back.
Site owners started creating the file to stop the 404. Server operators added log filters to hide the line. The default had turned into an obligation, and the obligation cost an extra request on every cold visit. There was no version of the web after 2001 where that request went away.
2005: The link tag splits the decision#
Browsers added rel="icon" so a page could point at a PNG, a GIF, or a file anywhere on the server. HTML5 later registered the link type properly. The root path survived as the fallback, which meant a site could declare one icon and still take a hit for another. The smallest detail had become two details: where the browser looks by default, and where it looks when the page says nothing at all.
2010: A cookie that was not a cookie#
Four researchers at Berkeley published work showing that favicons survived cookie deletion. Browsers cached icons in a store separate from the cookie jar, so a site could set a unique icon URL and read it back later as an identifier. The technique needed no script beyond an image request.
This was not a defect in one browser. It was the caching rule that made icons feel instant. Fixes landed over the next year: browsers cleared icon caches along with other site data, and some capped how long an icon could persist. The tracking angle faded from the headlines. The cache rule behind it did not change much.
2014 to 2021: Partitioning, slowly#
Safari and Firefox moved to partitioned caches first, tying stored resources to the top-level site that loaded them. Chrome shipped cache partitioning in version 86, in October 2020, then tightened it again later. Each of those changes fixed more than the favicon. None of them were announced as favicon fixes. The smallest asset was collateral in a much larger argument about how long a browser should remember anything at all.
2019: SVG, dark mode, and a media attribute#
Browsers began accepting SVG icons, which brought back scaling and, more usefully, prefers-color-scheme. Safari and Firefox read a media attribute on the icon link, so a page can serve a light icon and a dark one and let the browser choose. Chrome ignores the attribute. One small detail, honored by two engines and skipped by the largest one.
The tab strip keeps its own rules#
A modern page can declare six icons: 16 pixels, 32 pixels, a 180 pixel touch icon for iOS, a mask icon for pinned tabs, an SVG, and a dark variant. The browser picks one, caches it on its own schedule, and in private windows sometimes keeps it only in memory. Each declaration is a request the browser might make and a cache entry it might keep.
That is the pattern worth watching. The favicon began as a hardcoded path in a bookmark menu, became an accidental standard, then became a test case for cache partitioning, and now sits inside the argument about how much state a browser should hold between visits. The picture never mattered much. The lookup did.
What to check on your own site#
Open a private window, load your homepage, and watch the network panel for icon requests. Count them. If you see more than one, you are paying for a fallback you thought you had removed. If you see none and the tab shows a default globe, the browser is falling back to a path that returns 404, and your access log has been carrying that line for years.
The fix is small, which is the point. Serve one icon at the root, declare it in the markup, and set a long cache lifetime on the file. The detail that mattered in 1999 was the fixed location. The detail that matters now is the cache header attached to it.
More articles