[whatwg] <link rel=icon width="" height="">

Kornel Lesinski kornel at osiolki.net
Mon May 5 17:04:19 PDT 2008


On Mon, 05 May 2008 23:36:51 +0100, Aaron Boodman <aa at google.com> wrote:

>> There isn't much bandwidth to be saved. These icons are going to be
>> downloaded only once. 128x128 PNG icons take only 20-30kb.
>
> Without hints as to which file contains which size, the user agent
> must download up to four separate images before using them.

It doesn't have to download four images. For purpose of instant preview,  
UA can display first file it downloads.

And you don't have to use many files, because larger files can (usually)  
be scaled to smaller sizes.

>> Large PNG file + favicon for smallest sizes may be good enough in most
>> cases. In cases when icon design doesn't scale well, authors could  
>> provide additional .ico/.icns files.
>
> Why should web developers have to settle for "good enough", while
> desktop application developers get to create many differently sized
> icons optimized for use in different contexts?

I didn't say authors have to settle for good enough. When one file isn't  
good enough, authors could provide additional ico/icns which can have best  
quality OS can handle, e.g:

<link rel=icon href="favicon.png" type="image/png"> <!-- 16 or 32px -->
<link rel=application-icon href="appicon.png" type="image/png"> <!--  
128px, ~25kb -->
<link rel=application-icon href="appicon.ico" type="image/x-ico"> <!--  
possibly all sizes between 16 and 256px, ~90kb -->

UA could assume that ico/icns offers better quality on platform that  
supports this file format and also that this file is going to be larger  
(because it contains set of images as opposed to single image).

>> When website provides application icons (not favicon) in .icns or .ico
>> files, I think it can be reasonably assumed that these files contain all
>> sizes that are needed for desktop icons, and it doesn't matter which
>> exactly.
>
> I don't think that ico or icns format is going to be the common case.
> These formats require specialized software to create correctly,
> whereas any image editor can create pngs.

There are free, open-source tools to convert between .ico and set of PNG  
images. OS X comes with Icon Composer and there's 3rd party IconBuilder  
that works on MS Windows.

Favicons in .ico format are popular and supported by all major browsers  
today.

-- 
regards, Kornel Lesiński



More information about the whatwg mailing list