Java Glossary : favicon.ico

CMP home Java glossary home Menu no menu Last updated 2004-06-28 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

You are here : home : Java Glossary : F words : favicon.ico.

favicon.ico
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.

The use of such icons is 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="images/myicon.gif">

or for compatibility with buggy browsers like MSIE:

<link rel="shortcut icon" href="images/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 23x21 and a 24x16 image. It uses it 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, 32x32 and 48x48, and color depth is from 16 colors to True Color. IE 5 can only handle 16x16.

Unfortunately ordinary image producing tools like Paint Shop Pro can't deal with the format, so you need a specialised icon editor.


CMP logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 1129.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/faviconico.html J:\mindprod\jgloss\faviconico.html