To read the article online, visit http://www.4GuysFromRolla.com/webtech/051999-2.shtml

Custom Icons in IE5
by Christopher Miller


We have all bookmarked web sites right? Go ahead and look through your favorites folder and you will notice that all of your bookmarks look the same. What distinguishes one bookmark from another?

The only way to tell your bookmarks apart is by the title that is displayed. What if you could also give your bookmark a customized icon? The result would be a greater chance of a user picking your bookmark over another.

With the release of IE 5.0, it is now possible to give your site a custom icon when bookmarked!

Simply create an 16x16 icon (you will need an editor to do this), and name it favicon.ico. Simply place this icon in your root directory. When your site gets bookmarked in IE 5.0, your custom icon will appear instead of the default.

If you want to use an icon in a different directory, simply use the code below:

<LINK REL="Bookmark Icon" HREF="path/file_name.ico">

You can also create a button or link on your site that will prompt the user to bookmark your site:

<head>

<SCRIPT>
<!--
if ((navigator.appVersion.indexOf("MSIE") > 0)
  && (parseInt(navigator.appVersion) >= 4)) {
  document.write("<U><SPAN STYLE='color:blue;cursor:hand;'onclick='window.external.AddFavorite(location.href, document.title);'>Bookmark This Site</SPAN></U>");
}
//-->
</SCRIPT>

</head>

Here it is in action (for you IE users only, sorry):

Enjoy :o}

Christopher Miller
kyrakin@excite.com


Article Information
Article Title: Custom Icons in IE5
Article Author: Christopher Miller
Published Date: Wednesday, May 19, 1999
Article URL: http://www.4GuysFromRolla.com/webtech/051999-2.shtml


Copyright 2017 QuinStreet Inc. All Rights Reserved.
Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers