Welcome to Professional ASP.NET - Chris Love's Official Blog Sign in | Join | Help

Chris Love's Official ASP.NET Blog

Chris Love's Helpful tips, tricks and pragmatic development knowledge for the ASP.NET world.
Add to Technorati Favorites


ASP Insider
FavIcon and Internet Explorer

One of the most frustrating thing over the years for me is the true lack of support for FavIcon in Internet Explorer. It still continues in Internet Explorer 7, which I really like in just about every way possible. I mean it has great security features, pop-up blocking that FireFox could only dream about and of course integrated Tabbed browsing. But FavIcon by default, nooooooooooo.

What do I mean by default? Well for that matter what is a FavIcon? A FavIcon is the little graphic that is displayed to the left of the URL in the address bar of the browser. It is another nice thing to add to your site to personalize the experience. It is also used as the icon in the Favorites menu when a user bookmarks the URL. The standard name for the FavIcon is simply favicon.ico.

The way it is supposed to work is you can simply add an icon file, .ico, to the root folder of the Web site and the browser is supposed to check for it and use it if it is present. Most sites are not keen enough to do this, but many do. I have always noted FireFox, Netscape, etc seem to do this correctly, but IE has never been good at this.

Well I finally had it with this issue a week ago. I found there is a way to enforce this in the Header of the page. This is useful because we may put our favicon.ico in a sub folder, such as images or media. By including these link tags we direct eh browser to where our FavIcon is located. The other benefit is you can actually specify another file name for your FavIcon.

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>

<link rel="icon" href="favicon.ico" type="image/x-icon"/>

But I quickly found that it still took over a day for my local version of IE 7 to pick up on the FavIcon. This is bad and I really wish I could figure out why this is the case. I mean I tell IE to do a hard refresh by invoking Ctrl+F5. I have also go so far as to clear my cache, etc. So I am still not totally sure how to make IE recognize a new FavIcon or a change to the FavIcon faster.


Share this post :
Posted: Tuesday, October 16, 2007 12:45 PM

by Chris Love

Comments

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# October 16, 2007 1:38 PM

David said:

I have firefox, opera, and IE. I have the latest versions of all of them so when i tested my favicon on each browser the favicon showed up. However when i tried it at myschool which contains a different version of IE it didnt work. I tried putting it in my favorites YET it still didnt work. It is very frustrating and it could help my grade if i do it.
# November 5, 2008 3:27 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS