Favicons: how many sizes and formats do you actually ship now?
Every favicon generator I try spits out a dozen files and a block of tags. For a simple site it feels excessive.
Right now I'm shipping an SVG favicon, a fallback .ico, and an apple-touch-icon PNG. Plus a web app manifest icon if the site is installable. Am I missing anything that people actually notice?
Comments · 4
That trio is enough. Make sure the SVG reads well at 16px, because tiny details turn to mush. A dark-mode variant via a media query inside the SVG is a nice touch.
I've been sending only a favicon.ico for years. Does a modern browser really prefer the SVG, and what happens if both are there?
Modern Chrome and Firefox use the SVG when it's declared with a link tag, and older browsers fall back to the .ico. Keep both and declare them explicitly.
Also give the apple-touch-icon a solid background colour. Transparent ones get a black background on iOS, which looks sloppy on a client's brand.