I have had Jeff Davis' mini-FAQ on Favicons in IE7 saved in my RSS feed for many months. As I attempted to go to the source today, I discovered that in May Jeff Davis left Microsoft to pursue other opportunities. As a result, links to http://blogs.msdn.com/jeffdav/ returns "Defunct Blog". Having retrieved the mini-FAQ from the Google cache, it is copy/pasted below for preservation purposes.
why doesn't the favicon for my site appear in IE7?
Date: Thursday, 01 Mar 2007 21:03
Today I have a mini-FAQ on Favicons.
Q: How do I make a favicon appear for my site in IE7?
A: There are two ways. The first is to put a file in the root of your domain called favicon.ico. The second is to use a <link> tag with the rel="shortcut icon" value and the href value set to the URL for the Icon you wish to display.Q: How often does IE download the favicon?
A: IE will download the icon when a user first visits the site. The icon is stored in the Temporary Internet Files folder on the client machine. Additional metadata about the favicon is stored in the user's Url History database. If either store is cleared, or items relating to the favicon have naturally expired, then the icon will be downloaded again on the next visit. If more than one page (or site) shares the same favicon, it is only downloaded once. IE takes great pains to download the icon as few times as possible to reduce load on the server.Q: I see the wrong favicon for some sites I visit. How do I fix this?
A: If the history database has become corrupted in some way, this can happen. The simplest solution is just to use Delete Browsing History (on the Tools menu) to clear the cache and the history store.Q: I put a favicon.ico on my site as you described, but it still doesn't appear.
A: It must actually be a .ico (an Icon) file. Bitmaps, pngs, gifs, etc, will not work. IE7 will download your favicon to the Temporary Internet Files folder and call ExtractIcon() on the file. If this fails, we will show the default icon instead of your favicon.Q: I verified that my favicon really is an icon, but it still doesn't appear.
A: Since IE loads your icon out of the Temporary Internet Files folder, it must be able to actually store it there. If you are setting the no-cache directive for the icon file, then IE will not be able to display your icon and will display the default icon instead. You can use Fiddler to verify.Q: How do I create a different favicon for every page on my site?
A: Put a different tag on each page, pointing to a different icon.Q: I changed my site's favicon to a different icon, but the old one still shows in IE. How do I force IE to update?
A: If you just put the favicon.ico file in the root of your domain, IE doesn't have any way of knowing if it changed. To force an update, you need to use a tag and point to a different filename than you previously used. The current filename is compared against the known filename stored in the Url History database. When IE sees the filename has changed, it will download your new icon. Alternatively, you can ask your users to clear their history and cache (Tools->Internet Options->Delete Browsing History), which will also force IE to download the new file.That should cover most of the questions I've received about favicons in IE7. If you have more questions, feel free to ask.
Updated on Monday, 5th March to fix a spelling error and add some additional questions.
Author: "jeffdav" Tags: "internet explorer, favicons"
5 comments:
Nice Q&A! I was stuck in the "not-updating favicon" issue like forever. Never tried to clear "website history". Thanks!
i have done all the links, clear the history, set it to cache and no cache and the favicon does not show
the worst thing is that i have a client who DEMANDS!! the favicon to show on every browser
sorry but he's getting like that and i dont know what else to do or tell him. many of the sites have it, many of the sites use it, and the only place where it does not work for me is IE7... could you please help me...
yanith
yanitho@hotmail.com
Thanks for saving this. I couldn't find it at archive.org.
Microsoft doesn't normally delete departed bloggers blogs--my blog was deleted by a rogue agent.
You're welcome Jeff. Based on analytics, it is a very popular writeup and has been helpful to a lot of people.
Since it was still applicable, I also preserved your post on IE Pop-Up Blocker Settings at http://securitygarden.blogspot.com/2007/10/internet-explorer-pop-up-blocker.html
Regards,
Corrine
Yeah, I found a lot of forum postings that referred to the old msdn blogs location.
FYI, I have been re-posting all of the more useful blog posts to http://jeffcode.blogspot.com. Luckily archive.org has most of them.
Post a Comment