Update: There is a far easier way to accomplish the task. Just go to the „Safari“ main menu and go to „Safari zurücksetzen“/“Reset Safari“ and check „Alle Website-Sybmole entfernen“/“Remove all website icons“. Check/Uncheck all other options you want to perform. Click the OK button. That’s it.
The manual way for the hard guys
If you are a webdeveloper or -designer you probably have created favicons in the past. And as the rest of the site develops in a continuous process, your first created favicon isn’t probably the last version. While Browers like Firefox recognize a change of a site’s favicon Safari doesn’t. It caches the icons. So I want to show you a quick-and-dirty way of getting rid of old favicons forcing Safari to request the latest version from your website (and others).
Newer versions of Safari don’t put the icons in the ~Library/Safari/icons path, like stated in many posts on the web. Instead an SQLite Database is used, like for other informations Safari stores. To be able to access the Database, your need the SQLite command line client. Check if you’ve got one installed by opening a Terminal window and call „sqlite3“ (should be in the environment path – the location is propably at „/opt/local/bin/sqlite3“ under Mac OS X Snow Leopard). If the client isn’t found.first you need to download a precompiled SQLite Client binary and put it manually into „/opt/local/bin/“. After that follow these steps in the Terminal:
- Go to /Users/mikebattistella/Library/Safari („cd /Users/mikebattistella/Library/Safari“)
- Enter „sqlite3 WebpageIcons.db“
- Enter those commands on the SQLite command line:
delete from IconData; delete from IconURL; delete from PageURL; delete from IconInfo;
- Close the SQLite session by entering „.exit“
It’s a good idea to restart Safari now. That should be everything. If someone has an idea how to do it under Windows or other Mac OS versions feel free to comment.[amazon_search design=“2″ width=“256″ market_place=“US“ color_theme=“White“ default_search_term=“Mac OS X“ search_index=“Books“ columns=“2″ rows=“3″ outer_background_color=“#FFFFFF“ inner_background_color=““ background_color=““ border_color=““ header_text_color=“#777777″ linked_text_color=“#777777″ body_text_color=“#777777″ shuffle_products=“True“ show_image=“True“ show_price=“True“ show_rating=“True“ rounded_corners=“False“/]
Damn … looks like that’s gone now.
Thanks for the notice. Which Mac OS X Version do you have? I’ll try to have a look on it.
Meanwhile you could try the sqlite commands I’ve mentioned here. Would be interesting if this works.
Mh… unfortunately the sqlite commands doesn’t work either… it says:
Error: no such table: IconURL
Although the other commands seem to work, but there are no effects on my Safari Website Icons.
I am using OS X Maverics 10.9.1 by the way…. Would be great if there is any other way to clear the cache. It’s annoying when you try to see if my new favicon is working or not…
Best regards from Germany,
The SQLite solution (and the clearing of all icons from the reset safari menu) are both a little heavy-handed for my liking. The SQLite hint pointed me in the right direction to find my solution though. As a web developer, I’m often connecting to my webapp on localhost. I can reset the cons there by opening the WebpageIcons.db in sqlite3 and issuing this command:
update IconInfo set stamp = 0 where url like '%localhost%';
Thanks for the tip.
rm WebpageIcons.db – solved my problem quickly 🙂