Firefox Icon Whacking
One annoyance I’ve been having with the otherwise very excellent Firefox web browser is it’s caching of favicons. When I change the icon on my website, Firefox will stubbornly continue to show the old one. It never updates its icons.
So here’s a method to clear all the icons out of Firefox’s bookmark file. I use Linux but this should also work on other UNIXes and OS-X.
First you have to find the bookmarks file which is usually located in ~/.mozilla/firefox/something where something is a rather cryptic name like 1biuu3xr.default. The bookmarks file is simply called bookmarks.html.
Make sure you have shut down all instances of Firefox then change to the directory containing the bookmarks file.
First make a backup of the file with this command. Don’t skip this step, it is important:
cp bookmarks.html bookmarks.backup.html
Now filter out the icons with sed like this:
cat bookmarks.backup.html | sed "s/ICON=\".*\"//g" > bookmarks.html
When you next start Firefox, you will see that all your bookmarks now have blank icons. As you visit each site, they will update to the current icon for that site.
I do not guarantee this will not mess up your bookmark file, but that is why we made a backup first.
Update 21-May-2008
I’ve noticed now that I am using Firefox 3.0, that this is no longer neccessary. Just clear your cache, reload the web page and then quit Firefox. Next time you load it up, the icon will be updated.
