Safari cached favicons
I created a new favicon for a site I was making, and put it in place. All the mozilla-based browsers instantly saw it and updated it, but Safari seemed to never notice it. I couldn't figure out why. I thought it had it cached, but after erasing the history and browser cache (many times) and even resetting safari (supposedly nukes all settings, caches, cookies and what not. "Reset Safari" from Safari pull-down menu) it still didn't see the new icon. It noticed that the icon was gone, however (and showed a generic icon it has for un-iconed sites). But it still didn't show the icon.
So, I thought I'd search for it. I reset safari again and searched for safari stuff in my ~/Library. Interestingly enough, there was a n "Icons" directory under ~/Library/Safari. "Reset Safari" doesn't really reset it all! The icons were still there. I moved the directory over, and found that did it -- it noticed the new icon. But, all my old icons were gone. I needed a better solution.
I moved the directory back and searched for the icon I wanted to delete and deleted them. It worked. Here's how I did it:
find ~/Library/Safari/Icons -type f | xargs grep <domain name>
Looking in the files, that found them. You can remove them with a similar command:
find ~/Library/Safari/Icons -type f | xargs grep -l <domain name> | xargs rm -fv
And away we go!