favicon.ico : Java Glossary
home F words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 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 (all)
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.

For Internet use, you want something cross-platform, not MS proprietary, In HTML, 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:

<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 23x21 and a 24x16 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, 32x32 and 48x48, 64x64 and 128x128 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 *.ico format, so you need a specialised icon editor. A cheaper, though more clumsy way to create *.ico files is:

  1. Download a free copy of png2ico.exe. There are both Windows and Linux versions.
  2. Create or scavenge a *.png image, 128x128 usually with transparency.
  3. Save it in your temp directory as p128.png.
  4. Reduce the image to half size and save it as p64.png.
  5. Reduce by half again and save it as p32.png.
  6. Reduce by half again and save it as p16.png.
  7. At the command prompt type:
    png2ico firetruck.ico p16.png p32.png p64.png p128.png

CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] Spread the Net
You are visitor number 13,456.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/faviconico.html J:\mindprod\jgloss\faviconico.html