When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
Related Web Technologies
User Tips!
Coding Tips

Sample Chapters
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article
Print this page.
Published: Wednesday, May 19, 1999

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?

- continued -

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:


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>");


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

Enjoy :o}

ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article

Christopher Miller