[NTLUG:Discuss] Icon on Mozilla bookmark.
Terry Hancock
hancock at anansispaceworks.com
Thu Feb 13 11:53:45 CST 2003
Hi! (I've been lurking for a few days, as I am planning to move back
into North Texas in a month or two, BTW).
On Thursday 13 February 2003 05:46 am, Ryan Sweat wrote:
> Drop the file favicon.ico in the directory. When someone bookmarks your
> page, the icon file is automatically used. There exists software to
> make such images.
This does work in many cases, because some browsers like IE
automatically fetch this file whether told to or not, but that
behavior is considered ill-behaved (by web-standards folks),
and the "link" tag is the preferred method.
I am using this code:
<LINK REL="SHORTCUT ICON" HREF="<dtml-var site_url>/favicon.ico">
in my Zope product, which will typically render as:
<LINK REL="SHORTCUT ICON" HREF="http://narya.net/favicon.ico">
This tag can link to any ".ico" image in principle, though I'm not sure
what IE will do if you don't use "favicon.ico". I do know that this
allows you to use a single favicon.ico for your whole site, and that
you can also specify different ones for different pages.
Using the "link" tag improves the recognition of the icon by Konqueror,
Mozilla, and Galeon, and results in more correct behavior (they will
fetch the favicon.ico automatically, but only under certain conditions,
such as the first time you visit the site until the history expires -- this
can clearly screw you up when you're testing it). I didn't actually
test thoroughly to see what all caused a fetch, but it's definitely less
flaky if you use a correct link tag.
Although the ico file format is windows-centric (I think it's a special
case of bmp file), an excellent editor on Linux is KDE's "Icon Editor"
kiconedit. Your image should be 16x16 in 16 colors for maximum
portability.
It is a cool feature, isn't it? Have fun!
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
"Some things are too important to be taken seriously"
More information about the Discuss
mailing list