Hacker News new | past | comments | ask | show | jobs | submit login

Complex SVG Favicons will usually be larger in term of bytes than highly compressed PNG icons. We did an extensive study of Favicons served on the top 500 websites [1].

If you want to stick with the old-school PNG icons, we open-sourced `icopack` - our internal tool for efficient packing of individual PNGs into a highly-optimised ICO files [2].

[1] https://optidash.ai/blog/optimizing-favicons-for-the-worlds-...

[2] https://github.com/optidash-ai/icopack




> Complex SVG Favicons will usually be larger in term of bytes than highly compressed PNG icons.

The post you linked to doesn't include the word "SVG". Is there a separate article that compares using one SVG file vs. using multiple images?

It's hard to imagine that using a typical suite of PNG images at different sizes is going to be more efficient (and future-proof) than a single SVG file run through svgo.


> It's hard to imagine that using a typical suite of PNG images at different sizes is going to be more efficient (and future-proof) than a single SVG file run through svgo.

That's the wrong comparison though - each browser will typically only download one favicon size.


Great article

Earlier this year I created my own ICO editor for fun [1]. I learned a lot about reading and writing binary files, and decoding BMP data. While testing the editor on existing site favicons I kept finding that they were all uncompressed BMP data, and came to a similar conclusion to your article after checking the icons used on the Alexa top 100 sites.

I guess this is a combination of the ICO format being somewhat opaque (it's hard to tell if it's using BMP or PNG without using a hex editor), and that there aren't many applications available that create PNG-based ICO files in the first place (especially ones that are used in web development pipelines).

1. https://ico-editor.lach.app/ - Client-side ICO viewer/editor, can open and convert BMP to PNG.

PS. I noticed that your own site's favicon is uncompressed.


PNG support in .ico files was introduced in Windows Vista and I expect Internet Explorer just supports whatever the OS does. There might still be holdovers (both sites and tools) from when people cared about XP support.


Thank you for this. Hope this becomes standard practice.




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

Search: