Created
May 30, 2013 23:52
-
-
Save pieceofsummer/5682153 to your computer and use it in GitHub Desktop.
Refresh cached website icon in Safari
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
echo "Usage: $0 domain" | |
echo "Example: $0 google.com" | |
exit 0 | |
fi | |
echo "Deleting cache for $1" | |
sqlite3 ~/Library/Safari/WebpageIcons.db <<EOF | |
delete from IconData where iconID in (select iconID from PageURL where url like '%://$1/%'); | |
delete from IconInfo where iconID in (select iconID from PageURL where url like '%://$1/%'); | |
delete from PageURL where url like '%://$1/%'; | |
EOF | |
echo "Done. Now restart Safari for changes to take effect" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment