favicon.ico : Java Glossary

Internet Explorer looks for a file called favicon.ico on
your website to use to decorate any bookmarks it creates to your site. It is not a
standard Internet gif, but a proprietary Windows icon file. The basic format is the
16x16x16 format normally used on Windows menus (16-color icon with width and height
of 16 pixels) or a 32x32x16. You may optionally provide a different icon for each
subdirectory. If you don’t provide such a file, you will find your website logs
clogged with 404-file not found messages for favicon.ico.

For Internet use, you want something cross-platform, not MS proprietary, In
HTML (Hypertext Markup Language), the icons are officially
handled in another way, happily compatible with the original. You embed the
following tag in your html in the <head> section
before the <body>:

<link rel=icon href=image/myicon.gif>

or for compatibility with buggy browsers like MSIE (Microsoft Internet Explorer)
:

<link rel=shortcut icon
href=image/myicon.gif>

This way you can have a different icon on every page and you can use standard
*.gif, *.png or *.jpg files for your icon. At least in Opera, the size restrictions
appear relaxed. I successfully used a 23 × 21 and a
24 × 16 image. Opera uses the on the personal bar to
help you keep track of what site you are visiting.

Ideally it should be an *.ico file which can contain
multiple images at multiple resolutions and color depth. Resolutions are typically
16x16, 32 × 32 and 48x48, 64
× 64 and 128 × 128 and color depth is
from 16 colors to True Color. IE (Internet Explorer) 5 can only handle 16x16.

Unfortunately ordinary image producing tools like PaintShop Pro can’t deal
with *.ico format, so you need a specialised icon editor. A
cheaper, though more clumsy way to create *.ico files
is:

Download a free copy of
png2ico.exe. There are both Windows and Linux versions.

Create or scavenge a *.png image, 128 × 128 usually with transparency.