[sf-lug] + favicon.ico

Michael Paoli Michael.Paoli at cal.berkeley.edu
Mon Jul 12 20:02:38 PDT 2021


> From: "Rick Moen" <rick at linuxmafia.com>
> Subject: Re: [sf-lug] + favicon.ico
> Date: Mon, 12 Jul 2021 18:09:51 -0700

> Quoting Michael Paoli (Michael.Paoli at cal.berkeley.edu):
>
>> And, for those using non-ancient ewey GUI browsers,
>> now with favicon.ico:
>> https://www.sf-lug.org/
>
> Nice.
>
> I've had one on linuxmafia.com since September 2001, BTW.  The leading
> implementation at the time was the one MSIE 5 parsed from HTML root
> directories and displayed on the URL bar, starting March 1999.  It's
> kind of a wavering pseudo-standard.

Yeah, ... has quite an interesting history and ... uhm, standardization -
sort'a kind'a mostly almost.

> https://en.wikipedia.org/wiki/ICO_(file_format)#History covers the first
> attempt at a spec from the Redmondians, when it was a 48x48 pixel "BMP"
> bitmap file at some low colour depth -- which is what I created in 2001.
>
> Since early days, the pseudospec has sprouted a number of variations.

Yup.  Years back, Eric P. Scott very nicely crafted one for balug.org,
and we've been using that one there ever since.  I remember his remarks
at the time ... at least paraphrasing from memory - a relatively messy
psuedo-standard.  And years later ... today ...

It's still a bit messy ... though much easier than it once was.
E.g. there's on-line converters ... which, well, do whatever they do,
however well or not-so well.  And GIMP can export suitable type ...
but GIMP doesn't automagically do all the work for you.  After taking some
examples and loading them into GIMP, it became clear quite immediately that
there was a bit more to it ... and also it was pretty easy to do in GIMP -
if one suitably created and sized the image there, ... and notably also
likewise the layers.  Layers?  Yeah, these favicon.ico "images" are really
icons, that typically actually contain multiple images - notably generally
of different sizes and other characteristics.  Anyway, wasn't too hard to
figure out how to do that in GIMP after also looking at some example ones.
But even with that, there doesn't seem to be a super clear cut definitive
example of exactly what's the best way to do it - e.g. exactly how many
images within of exactly what sizes, and the particular format of each.
So, yeah, it remains at best at least a little bit messy ... or certainly
at least somewhat ambiguous.

Oh, and ImageMagick's identify command is quite handy for fairly concisely
spelling out what's contained within these files.
E.g.:
$ id; pwd -P; identify favicon.ico
uid=22035(sflugwww) gid=22035(sflugwww) groups=22035(sflugwww)
/var/www/www.sf-lug.org
favicon.ico[0] ICO 16x16 16x16+0+0 8-bit sRGB 0.000u 0:00.000
favicon.ico[1] ICO 32x32 32x32+0+0 8-bit sRGB 0.000u 0:00.009
favicon.ico[2] ICO 48x48 48x48+0+0 8-bit sRGB 12014B 0.000u 0:00.009
$

And yes, it did start with Microsoft basically going off on their own and
doing stuff ... and then it sort of getting copied - at least in general
behavior by others ... and eventually worked into some actual standards -
which have also shifted about some fair bit along the way.

>> Notice, e.g. in the upper left part of tab.
>> Likewise also added on http://bad.debian.net/
>
> http://bad.debian.net/favicon.ico and
> https://bad.debian.net/favicon.ico are currently 404.

fixed: http://bad.debian.net/favicon.ico
and ... I don't have the access to be able to fix:
https://bad.debian.net/favicon.ico

But if you use the URL above but have it resolve to one of balug's IPs,
then it will work ... but that's not of much use to most of The Internet
in general.

$ cmp <(curl -s --resolve bad.debian.net:443:"$(dig +short balug.org.  
A | head -n 1)" https://bad.debian.net/favicon.ico) <(curl -s  
http://bad.debian.net/favicon.ico) && echo MATCHED
MATCHED
$
Oh, and the above - has a nice valid CA signed cert ... but without
being able to change DNS, or install it on the web server to which DNS
resolves to ... oh well, it's on one of those todo lists:
https://www.wiki.balug.org/wiki/doku.php?id=bad:start

Anyway, on the bad web page, since it's really just an informal
extension of Debian ... and tiny bit of traffic compared to
debian.org ... I just linked it in the <head> section of the page:
<link rel="shortcut icon" href="https://www.debian.org/favicon.ico" />
... that also ensures it stays current with whatever Debian.org is serving
up.  But, alas, that missed local /favicon.ico ... so added that ... well,
for http://bad.debian.net/ anyway.

And, for better and/or worse, the /favicon.ico thingy functions as a
default for the site.  E.g. most things on balug.org will show that ...
except where it doesn't, e.g.: https://www.wiki.balug.org/wiki/
And, per the standard(s) - at least for reasonably compliant non-ancient
browser, it can be configured on/in web page itself, so that can be
distinct from whatever /favicon.ico might happen to be ... or if that
is even there at all.




More information about the sf-lug mailing list