Live data from Hacker News

We analyzed 425k favicons

iconmap.io

61–70 of 131 posts

Re: We analyzed 425k favicons

#61
post #34

Earlier quoted context omitted.

Oh hey, Discord must have seen this article -- their favicon is down to 14k now.

It's not, at least for me. If you checked in devtools, that's gzip over the wire size. Hover over the size and it'll show you the actual resource size, still 285k for me.

The gzipped size is probably the correct metric to care about, right? Virtually all browsers will support that.

Sure, Discord could do a bit better, but it's not correct to knock them here for costing their users 285KB.

Re: We analyzed 425k favicons

#63
I worked on Opera Link, the first built-in synchronization between different installations of the Opera browser, both desktop, Opera Mini and Opera Mobile (+ a web view).

Favicons got included in the data from day one, and it was awesome to get the look and feel of your bookmark bar/UI with the correct icons right away.

Back then we stored the booksmarks in a home grown XML data store (built on top of mysql, acting more or less as a key-value store). This worked quite nice, and it allowed us to easily scale the system.

One night the databases and backends handling the client requests suddenly started eating a lot more memory, and the database started using much more storage than normal.

As one of only two backend devops working on Opera Link, I had to debug this, and find out what was going on. After a while I isolated the problem to a handful of users. But how could a few users affect the system so much?

As a part of the XML data store, we decided naively to store the favicons in the XML, as a base64 encoded string. While not pretty, a 16x16 PNG is not that much data, and even with thousand of bookmarks, the total overhead on compression and parsing was neglishable. What we did not foresee was what I uncovered that night; A semi-popular porn site had changed something on their server. They had started serving the images while also pointing browser to the same images as the favicon! Each image being multiple megabytes, sent from the client, parsed on the backend, decoded, verified, encoded back to base64, added to the XML DOM, serialized, compressed and pushed back to the database...

Before going to bed that night, I had implemented a backlist of domains we would not accept favicons for, cleaned up the "affected" user data, and washed my eyes with soap.

I miss those days!

Re: We analyzed 425k favicons

#64

Earlier quoted context omitted.

What most of them do is they will use Wordpress exploits to get into random wordpress website ran by people who know nothing about managing a website and are running on a $3/mo shared hosting account. After they get into these random wordpress sites, then then embed links back to their sketchy site in obscure places on the wordpress site that they hacked, so that owners of the site don't notice, but search bots do. T…

> "had their nephew throw up a wordpress site instead of hiring a professional" The web is supposed to be accessible to everyone. This type of "blame the victim" attitude is a poor way to handle criminal activity.

[deleted]

Re: We analyzed 425k favicons

#65
post #61

Earlier quoted context omitted.

It's not, at least for me. If you checked in devtools, that's gzip over the wire size. Hover over the size and it'll show you the actual resource size, still 285k for me.

The gzipped size is probably the correct metric to care about, right? Virtually all browsers will support that. Sure, Discord could do a bit better, but it's not correct to knock them here for costing their users 285KB.

This is bad math, not researched heavily but in 2020 discord had 300 million users. 285kb goes a long way with wasted energy and bits flowing through the pipes. I agree generally with what your saying though gzipped sizes are what's being sent some CPU usage somewhere to unzip. less bytes == less waste?

Re: We analyzed 425k favicons

#67
post #32
post #25

Earlier quoted context omitted.

People make mistakes all the time. Breaking because somebody made a mistake that you can correct for just leads to unnecessarily fragile code. What's the point of failing and breaking stuff if someone tells you their image is 144x144 but it's really 145x145? Who does that benefit?

The opposite is the case. Overall, being too lenient in what code accepts and applying heuristics will lead to way worse problems down the line. For example, you want your compiler to fail hard instead of saying: "Oh, this isn't a pointer, but I'm sure you meant well, I'm just going to treat it as a pointer!" In this particular case, it seems to me that the hints serve no purpose and should be abolished, and in the m…

The hints are not a hint in how to render the icon - browsers don't need hints for that. the hints are an instruction to browsers on which icon to download in the case where multiple icons are specified.

if you are safari and you don't know how to display SVG favicons, then you don't need to waste bytes downloading a favicon only to fail to display it. the HTML does not limit a site to only one favicon.

Re: We analyzed 425k favicons

#68
post #63

I worked on Opera Link, the first built-in synchronization between different installations of the Opera browser, both desktop, Opera Mini and Opera Mobile (+ a web view). Favicons got included in the data from day one, and it was awesome to get the look and feel of your bookmark bar/UI with the correct icons right away. Back then we stored the booksmarks in a home grown XML data store (built on top of mysql, acting m…

Wait, so you can see user's data directly?

Re: We analyzed 425k favicons

#69
post #26

I got mine down to 160 bytes with some pixel tweaking and converting it to a 16-color indexed PNG. It's not a lot of work or very difficult (I'm an idiot at graphics editing), but you do need to spend the (small amount of) effort. I embed it as a data URI and it's just four lines of (col-80 wrapped) base64 text, which seems reasonable to me. Haven't managed to get my headshot down to less than 10k without looking hor…

there are png optimizer programs, e.g. optipng

I found https://pngquant.org/ to be pretty good.

Re: We analyzed 425k favicons

#70
post #34

Earlier quoted context omitted.

Oh hey, Discord must have seen this article -- their favicon is down to 14k now.

It's not, at least for me. If you checked in devtools, that's gzip over the wire size. Hover over the size and it'll show you the actual resource size, still 285k for me.

I committed a fix, it's now 24k uncompressed! :)
Post reply on HN