Forum Moderators: open
Google "favicon" for software to create it (you could use paint to create a bitmap, and rename it, but I believe this can create errors under non MS platforms).
Also, [msdn.microsoft.com...] .
Firefox doesn't forget about it, and will refersh the icon if it has changed (IE nevers does this, either).
<LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico">
That <link> element points the browser to the favicon you want to associate with that html document.
But this does not mean that a gif, jpg or png will work as a favicon. Those are different file formats from .ico - which is the format that your desktop icons are written in.
If you have a gif or a jpg that you want to adapt to be your favicon, you need to save it in this .ico format, and not just change the extension of a regular image file.
The issue is that .ico is (at least potentially) a kind of "library" of icon files - you've seen the option in Windows for using small or large icons? Both versions of the icon reside within the same .ico file.
Because gif and jpg are not file libraries, image data in those formats does need to be changed over. The favicon is being displayed in areas of the browser "chrome" that are tied to the operating system - hence the need for an ico file.
In fact, in Explorer you can drag a bookmark to your desktop, and if there is a favicon associated with that bookmark, it will display at 32x32 if your desktop is set to show large icons. Since most favicons do not have a 32x32 version, they just get scaeld up and look jaggy. But it is possible to place the 32x32 version within the .ico file (with the right software, such as IconForge) and then the jaggies are avoided.
You can see the same thing if you keep a local version of your favicon in a folder. If you set the folder to show large icons, you'll see the favicon scaled up.
But people do not usually drag bookmarks to their desktop, as far as I know. So it's not a big deal, just a fine point. It does, however, illustrate the "library" nature of the .ico format.
<LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico">
At least Safari (and I think Firefox is the other browser) will ask for the favicon.ico at the site root even if this tag is not included. I learned this because I my logs are always full of 404's for the favicon. It's the main reason I add a favicon -- to clean up my logs. ;)
The link load seems to work better. Thanks for the tip.
Mozilla also supports a slightly different link syntax for this, because Microsoft screwed up. "shortcut icon" actually indicates that the link is for a "shortcut" and an "icon", but IE treats this specially. Mozilla-based browsers ignore one of the words (shortcut, I think), so you might be able to get separate icons for IE and Mozilla by using on link with "icon" and one with "shortcut icon". I haven't tried it, but if anyone wants to experiment...
Also, Mozilla based browsers should handle any image format you care to use, although IE is limited to .ico files.
Konqueror and Safari favicon spam sites that don't have icons with each new visitor now matter how their prefs are set and whether or not they bookmark the site. IE does it only when bookmarking, but I don't know about any browsers other than those I've mentioned. Any Opera fans remember how it behaves?
Opera finds favicons at the root of the site with no special code in the head of the page.
If you want to point to an icon in a different location, Opera will obey either syntax, with or without the word "shortcut".
<added>
By the way, my FireFox 1.0 shows the favicons and I never activated a hiddne preference.