Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Remove Safari's cached favicon.ico files Web Browsers
This may be of interest to web-developers. As far as I know, Safari is the first Mac browser to make use of favicon.ico files (the tiny icon that represents a site on Windows Internet Explorer). Feel free to correct me if I'm wrong [Editor: Chimera supports them].

Web-developers may have noticed that Safari caches these icons and there's no way to get Safari to reload it from the site if you change this icon. "Empty Cache..." etc. doesn't do it. This is annoying if you have made a new one for your site and want to see it in Safari.

Since the .ico cache took me quite a while to find, others might have had the same trouble. It's in ~/Library -> Caches -> com.apple.WebKit -> Icons. To empty the cache, quit Safari and send the Icons folder to the trash (or anywhere). You can apparently do this without affecting anything else in Safari. Use at your own risk, but I have done this several times over several weeks without problems.

If anyone discovers how to delete an individual .ico from the cache, let us know.

Update for 1.0: Reader LouieNet writes in with this change for Safari final:
With the release of Safari 1.0 (v85), however, that cache directory has been moved to ~/Library/Safari/Icons. To remove the whole cache, simply quit Safari and delete the new cache directory. (Alternatively, may want to use the find command if you know the creation date, etc.)
I'm not sure if the new structure makes it any easier to remove an individual favicon or not...
    •    
  • Currently 2.00 / 5
  You rated: 2 / 5 (9 votes cast)
 
[61,344 views]  

Remove Safari's cached favicon.ico files | 19 comments | Create New Account
Click here to return to the 'Remove Safari's cached favicon.ico files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
App to delete favicons
Authored by: Alex281 on Jan 31, '03 10:15:57AM
This app can delete individual icons and it does it well too.

[ Reply to This | # ]
Also Mozilla...
Authored by: network23 on Jan 31, '03 10:40:45AM

Mozilla supports them too.



[ Reply to This | # ]
Safari Icon manager
Authored by: wuf810 on Jan 31, '03 10:50:54AM

Just to confirm Alex's link is to an app called Safari Icon Manager and it allows you to view cached favicon icons as well as delete them individually.



[ Reply to This | # ]
I had never noticed
Authored by: droosan on Jan 31, '03 11:50:05AM

that mozilla and chimera used them.

I like how Safari uses them in bookmark menus; very useful.

Thanks for pointing out the application. I'll try it out now.



[ Reply to This | # ]
Add favicon.ico icon to website
Authored by: ckier on Jan 31, '03 03:31:33PM

I have a website being hosted on my mac using mac OS X's built Apache web server. Is there anyway to add one of these icons to my website. Can I just modify something in the httpd.conf file.

Thanks,
Christopher Kiernan



[ Reply to This | # ]
Re: Add favicon.ico icon to website
Authored by: zzen on Jan 31, '03 05:53:43PM
No need to edit httpd.conf. Just type favicon in your google bar, man. What you get is plenty of links on how to create the favicon file, including ways to include it in the HEAD of HTML pages, so that browsers know where to load it. This is not the only link in existence, probably not even the best one. I think mozilla.org had some comprehensive pages about favicon files, but I am not sure where.

[ Reply to This | # ]
Add favicon.ico icon to website
Authored by: geohar on Feb 01, '03 04:33:25PM

as noted, there's plenty of guides to creating the icon and specializing the icon for different parts of the site. Things to note that you might need to do for apache & os x are:

put a

favicon.ico

in the root of you website (so safari can find it if you don't want to have to set up different icons for different parts of the site).

Add a line to apache's mime config file. This lives in /etc/httpd/ and tells apache which mime types belong to which extensions. Add the line

image/x-icon ico

so apache serves up the file.

You can create the icons with iconographer X, they are windows ico files. Make the icon 8bit depth max, or 16. It's the 'small' size if you're using iconographer (And remember to turn OFF the other unneeded sizes to keep the file small - there is alegedly some max size).

Hope this helps.



[ Reply to This | # ]
Another way
Authored by: jcstudio on Jan 31, '03 06:34:32PM

I found that emptying Safari's cache, then clearing the history, does the trick. I had a bad favicon on my site that rendered garbage, but after doing this it cleared the way for my new icon. I am using my favicon on a .mac hosted site with no problem. I couldn't get Photoshop to save as the proper format (a Windows ICO file) but Graphic Converter took care of it.



[ Reply to This | # ]
PNG/GIF/JPG can also work
Authored by: sardu_mac on Jan 31, '03 09:07:28PM

Many browsers will also show 16x16 pixel PNG images in addition to ICO files. Make sure to add a TYPE attribute specifying the Content-Type if you decide to use another format:
<link rel="Icon" href="http://members.shaw.ca/USER/myicon.png" type="image/png">

http://members.shaw.ca/slf/favicon.html



[ Reply to This | # ]
PNG/GIF/JPG can also work
Authored by: leebennett on Feb 02, '03 07:34:30PM

thos formats may work for safari, but to not work for windows IE ... in case you care.



[ Reply to This | # ]
Icons: Can we disable it?
Authored by: Onirix on Feb 10, '03 10:28:51AM

I would like to disable the icons safari uses entirely. I find it slows down the menus in my bookmarks bar, and when I clean the icon cache it speeds things up immensely. Where is the code to take this feature out of safari?



[ Reply to This | # ]
Remove Safari's cached favicon.ico files
Authored by: sober on May 18, '03 06:39:58AM

Couple of comments:

The icon manager homepage says[1]:
"As of Safari v73, Safari Icon Manager 0.6.3 no longer runs."

So, you have to delete the icons manually.

Also, I believe that if you just save your 16x16 image as a BMP and then rename it to favicon.ico it will work just fine.

[1] http://www.ircandy.com/openmac/sim/

I also find the drop down menu slow, but I find all drop down menus slow. (The worst are those sites that make you select your country from a list of 400. i can type my country about 5x by the time the drop down appears and i scroll through it. but, i digress...)



[ Reply to This | # ]
Remove Safari's cached favicon.ico files
Authored by: DougG4 on Jul 11, '03 04:05:07AM

Just thought I'd add that a new version has been released that is now compatible with v85 (I'm the developer). I finally got around to it, let me know if you have any problems by e-mailing me at the address on the page.



[ Reply to This | # ]
Remove Safari's cached favicon.ico files
Authored by: paulpro on Jan 20, '08 02:21:30PM

Click on the previous form field. (before the drop-down menu you want to avoid using)

Hit Tab so that the Country drop-down menu is selected.

Type the first few letters of your country's name.

Done. (and if you're tabbing through the form, you won't need to click on the previous field)



[ Reply to This | # ]
Remove Safari's cached favicon.ico files
Authored by: jimmiedimmick on Apr 14, '05 11:49:28PM

Hmm...None of this works in Tiger. Anyone know how to clear the cache in Tiger?



[ Reply to This | # ]
Remove Safari's cached favicon.ico files
Authored by: DougG4 on Jun 16, '05 01:34:55AM

I updated Safari Icon Manager to work with Tiger's Safari.
http://software.doogul.com/sim/



[ Reply to This | # ]
Remove Safari's cached favicon.ico files
Authored by: Zectbumo on Feb 28, '09 06:46:40PM
> If anyone discovers how to delete an individual .ico from the cache, let us know.
I found out how to do it but I think this isn't a problem anymore so I won't bother posting the steps that are involved. Maybe this question should be removed.
> I'm not sure if the new structure makes it any easier to remove an individual favicon or not...
I'm not sure what the procedure for the old structure was but I'm going to guess it didn't involve using SQL commands with JOIN statements so I'm going to say the new procedure is much more difficult. -alfred

[ Reply to This | # ]
Remove Safari's cached favicon.ico files
Authored by: kbs on Sep 08, '11 03:34:56PM

I've recently had this problem, and here are the steps I took. (YMMV, as always; and I assume you're comfortable working in a shell.)

The Safari version I use: Version 5.1 (6534.50)

The icons are now completely embedded in a sqlite database, at $HOME/Library/Safari/WebpageIcons.db

Exit Safari.

With a URL to the favicon.ico to be removed, here's what worked for me.

$ sqlite3 $HOME/Library/Safari/WebpageIcons.db
sqlite3> select iconID from IconInfo where url='http://hints.macworld.com/favicon.ico';
nnnn

You should get a number nnnn. Use that number in the following.

sqlite3> delete from IconData where iconID=nnnn;
sqlite3> delete from PageURL where iconID = nnnn;
sqlite3> delete from IconInfo where iconID=nnnn;
sqlite3> .quit

and, restart Safari -- visit the page of interest, etc.



[ Reply to This | # ]
Remove Safari's cached favicon.ico files
Authored by: xhinter on Nov 19, '13 07:42:29AM

How can I replace a favicon for either one URL or a set of URLs in WebpageIcons.db?



[ Reply to This | # ]