Several of the pages on my Microsoft Internet Explorer Favorites menu have customized icons associated with them. How can I create such an icon so that visitors who bookmark my site will see that icon in their own Favorites menus?

Carolyn Masters

It's easy. All you need is an icon of the correct size and a place to store it on your Web server with the rest of the files for your site. Your visitor needs IE 5.0 or higher.

The first step is to create the icon. Using an icon editor (we suggest PC Magazine's own IconEdit32), design whatever you want to display as an icon. The icon must be precisely 16 by 16 pixels; any variation from this size will cause IE to ignore the icon. Experiment with the number of colors you give the icon. If you can get away with using 256 colors or even 16 colors, you should do so, because some Web users still configure their systems to those limitations.

Save the file with the name Favicon.ico, then upload the icon to the root directory of your Web site. Whenever a visitor bookmarks a page, IE then automatically checks the site's root directory for the Favicon.ico file. If it does not find one, IE sends an error message to your server, but the visitor will not receive such a message.

Note that on a user's machine, the icon is stored in the Temporary Internet Files folder. If the user empties the cache, the icon for the Favorites menu item disappears. To get it back, the user will have to delete that particular Favorites item and then add it again. Or users can make Favorites icons permanent by using PC Magazine's free FavOrg utility.

Related

Alternatively, you can give the file a different name and provide a hyperlink to it inside the HEAD container. This hyperlink must be inside a LINK tag with a REL attribute, and the attribute's value must be set to"SHORTCUT ICON". The following HTML code results in a Favorites icon appearing exactly as if it were a Favicon.ico file:

In your own code, of course, the URL and filename will be different, and your HEAD container will likely contain additional code.

A visitor to your site will see the shortcut icon when he adds your home page to his Favorites menu. When he does, the icon will appear in the Favorites menu beside your site's name, and it will also appear in IE's Address bar when the visitor accesses your site via that menu.

Get Our Best Stories!

This newsletter may contain advertising, deals, or affiliate links. Subscribing to a newsletter indicates your consent to our Terms of Use and Privacy Policy. You may unsubscribe from the newsletters at any time.