You don’t need any HTML to add a favicon to your site
mathiasbynens.be
mathiasbynens.be
Does anyone know of any other user agents that don't hit /favicon.ico regardless? Feed readers for example?
But yeah — some web apps rely on /favicon.ico as well. All the more reason to just place it there :)
Edit: I tested on a domain that previously didn't have a favicon. Putting a PNG named favicon.ico at the root without an explicit <link> worked in Chrome 9, Firefox 3.6, and Safari 5. It didn't work in IE 9.
Ruling out Nginx, the pickle was that I should probably rewrite requests to domain.com/favico.ico to cdn.domain.com/favico.ico. But that rewrite has just as much or more httpd overhead as just serving the favico, with an extra client-side performance hit as the client has to do an extra http request to follow the 301.
I ended up with just using a <link> tag in <head>, which should at least get modern browsers off Apache's back. But I wish there was a more complete solution.
No, it isn't.
It’s time we stop complaining and start embracing this part of the URL layout as if it was robots.txt we’re talking about.