Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Downside: if you include it as an HTML link you can use a PNG file, whereas the version in the root has to be an icon file. Chances are, that's the only time you'll ever use the icon format, and many image apps don't support it. It's a weird throwback to another era, like the web equivalent of a vestigial tail.


I haven't done complete browser testing, but I know you can use a PNG and simply change the extension to .ico and it will still work in some browsers.

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.


Maybe it'll work if you send the appropriate `Content-type`?


Can't you just issue a 301 redirect from /favicon.ico to /favicon.png?


IE doesn’t support any other format than ICO for favicons. Redirects, spoofed MIME types or fake file extensions won’t change that.


Is that also true for more recent versions of IE?




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: