{"canonical_url":"https://engineer.company/glossary/favicon/","content_markdown":"# Favicon\n\n## What it is\n\nA favicon is the icon a website names as its own, so that the browser can put it\nin the tab, in the address bar, beside a bookmark and in the history list. The\nword is short for “favorites icon”, after the bookmarks menu of Internet\nExplorer, the first browser that went looking for one. People also say site icon\nor tab icon, and the plural is favicons. In HTML it is declared with a `link`\nelement whose `rel` is `icon`; older markup writes `shortcut icon`, a spelling\nthe standard still accepts for historical reasons.\n\nA page may declare several of them at once, each with a `type`, a `sizes` value\nand an optional `media` query, and the browser chooses the one that suits the\nplace it is drawing. The sizes are written in device pixels, so `32x32` means\nthirty-two physical dots, and the keyword `any` is reserved for a scalable\nformat such as SVG. When two candidates are equally suitable, the one declared\nlast wins. When a page declares none, a browser fetching it over HTTP or HTTPS\nmay ask for `/favicon.ico` at the root of the host anyway: a habit from the late\n1990s that the HTML standard now writes down as permitted behaviour.\n\nThe `.ico` file behind that habit is a container rather than a single picture.\nOne file can hold several bitmaps at different sizes, and the browser takes the\nframe that fits; its registered media type is `image/vnd.microsoft.icon`. Today\nPNG and SVG are the usual alternatives, and any format the browser decodes is\nallowed in principle: one of this site's own pages declares a WebP.\n\nThe favicon is the smallest member of a family that is easy to blur together.\nApple's home-screen icon, the `apple-touch-icon`, is a separate PNG that iOS\nlooks for under its own name. An installed web app usually takes its icons from\nthe web app manifest, including a “maskable” variant drawn with a safe margin so\nthe platform can crop it to a circle or a rounded square. The large picture a\nchat app shows when someone pastes a link is a share image, set by different\nmarkup altogether, and no browser uses it in a tab.\n\n## Why it matters\n\nThe decision a team actually faces is how many icon files to ship, from what\nsource, and who keeps them in step. It looks like a design detail. In practice\nit is a small piece of infrastructure that touches every platform the site\nappears on.\n\nRecognition is the part a buyer sees first. At sixteen CSS pixels in a strip of\ntwenty tabs, the favicon is the only piece of the brand a reader looks at while\nthey are working somewhere else, and a generic page glyph in that slot reads as\na site nobody finished. The same icon labels the bookmark, the history entry\nand, on several search engines, the result itself.\n\nCost and correctness are the part an engineer sees. Each surface has its own\nconvention: an ICO or PNG for the tab, a 180-pixel PNG for Apple's home screen,\na set of square PNGs listed in the manifest for installs, and a dark tab strip\non which a dark mark disappears. The quick route is a favicon generator that\nwrites thirty files and a block of markup to paste. It works, but pasted markup\ncarries pasted claims, and a `sizes` value describing somebody else's files is\nwrong from the first day.\n\nCaching is the part nobody plans for. Browsers keep icons far longer than pages,\nand the standard explicitly does not require them to refresh an icon when the\nlist of declared icons changes. A rebrand therefore reaches returning visitors\non the browser's schedule rather than the site's. The root guess has a cost of\nits own: a browser can ask for `/favicon.ico` on a first visit; if the file is\nmissing, the request can return a 404 and leave an entry in the site's logs, and a site behind a login may answer\nthat guess with a password prompt.\n\nSo which format? An SVG is one small file that scales to any size and can switch\ncolours with `prefers-color-scheme`. A detailed drawing, by contrast, survives\nbetter as a raster, with the ICO kept for software that reads nothing else. Most\nsites need both a favicon and an apple-touch icon, because each platform reads\nonly its own.\n\n## What it looks like in practice\n\nThis site's icons come from drawings rather than from a generator.\n[The visual identity was built from two hand-made drawings](/portfolio/built-the-visual-identity-from-2-drawings/),\nand scripts produce everything derived from them: the favicon set in its\nrequired sizes, the touch icons and the launch images at each device size.\nGeneration is a task anyone can run. A staleness check compares the commit date\nof every derived asset with that of its source and fails when a derived file was\ncommitted first, and derived files are never edited by hand. The page names the\nprice: a hard dependency on the generation toolchain.\n\nThe [credits page](/credits/) names the tools in that toolchain: Python, driving\nImageMagick, generating the icon set from a drawing of the mark.\n\nThe site's own templates show the choices that followed. Each page declares a\n180-pixel PNG and a three-frame ICO holding 16, 32 and 48 pixels. The tab mark\nused to be a bold cog, on the theory that a simple silhouette survives sixteen\npixels better than a detailed drawing; rendered side by side over a light tab\nstrip and a dark one, the detailed drawing held up and the cog did not, so the\ntab now shows a raster render of the brain drawing that is the company's mark.\nThe manifest lists the same two root files, and its icon set is read off disk\nfrom the folders the generator writes, with each size taken from the file name,\nso a new size appears in the list without anybody typing it.\n\n## Where it goes wrong\n\n**The old icon survives a rebrand.** The site ships a new file under the same\nname and returning visitors keep seeing the old mark for weeks, because the\nbrowser keeps its own copy and owes the page no refresh. Publish the new icon\nunder a new file name, update the `link` elements, and treat the root\n`/favicon.ico` as a fallback that changes last.\n\n**The declared sizes describe a different file.** Markup copied from an example\nlists sizes the file never held, and the browser picks a candidate on a false\nclaim and scales the wrong frame. This site's manifest once said its ICO held\nseven frames when the generator wrote three, and listed an SVG with three pixel\nsizes, which a vector file does not have. Write `sizes` from the file itself, or\nderive it from the generator's output.\n\n**A guessed path returns something other than an icon.** iOS asks for\n`/apple-touch-icon.png` at the root of a host when a page declares no Apple\nicon, and browsers do the same for `/favicon.ico`. On a host where unknown paths\nfall through to another application, the guess gets a redirect, a login page or,\non one of this site's pages served from a second host, a 401. Declaring the icon\nexplicitly turns the guess into a request for a file that exists.\n\n**The mark disappears on a dark tab strip.** A black logo on a transparent\nbackground vanishes when the browser draws its tabs in dark grey. Render the\nicon over both a light and a dark strip before choosing it, and give an SVG\nfavicon a `prefers-color-scheme` rule or the raster a background of its own.\n\n**The detail turns to mud at sixteen pixels.** A full logo with a wordmark\nscaled to a tab slot becomes a smudge. Test the real size on a real tab rather\nthan the design file at 800%, and pick the part of the mark that still reads\nthere.\n\n## Further reading\n\n- [HTML Standard: link type “icon”](https://html.spec.whatwg.org/multipage/links.html#rel-icon)\n  — how a browser chooses among declared icons, what `sizes` means and when it\n  may fetch `/favicon.ico` by itself.\n- [IANA: image/vnd.microsoft.icon](https://www.iana.org/assignments/media-types/image/vnd.microsoft.icon)\n  — the registration of the ICO media type.\n- [Image Resource](https://www.w3.org/TR/image-resource/) — the W3C definition\n  of an icon with `src`, `sizes` and `type` that manifests reuse.\n- [Apple: Configuring Web Applications](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html)\n  — the `apple-touch-icon` convention and the root lookup iOS falls back on.\n\n\u003chttps://engineer.company/glossary/favicon/\u003e\n","date_modified":"2026-11-08T05:31:18Z","description":"Which icon files a site really needs, how a browser picks one from the list a page declares, and why an old or mis-sized icon keeps coming back.","formats":{"gemtext":"https://engineer.company/glossary/favicon/index.gmi","gopher":"https://engineer.company/glossary/favicon/gophermap","html":"https://engineer.company/glossary/favicon/","json":"https://engineer.company/glossary/favicon/index.json","markdown":"https://engineer.company/glossary/favicon/index.md","pdf":"https://engineer.company/glossary/favicon/index.pdf"},"kind":"page","language":"en","title":"What is a favicon?","url":"https://engineer.company/glossary/favicon/","version":1}