How do I get Safari 9 to use my new pinned tab icon?

Safari 9 on OSX supports showing icons on its new pinned tabs, using the following syntax:

<link rel="mask-icon" color="red" href="/mask-icon.svg">

However after adding this line, reloading my page, and pinning the tab, the icon doesn't show up.

How do I tell it to refresh the icon?


Solution 1:

Safari is very keen to cache these icons, and indeed the lack of them. Once it has decided there is (or is not) an icon on your site, it will retain that knowledge, potentially for a very long time, and no amount of restarting or refreshing will change that.

You can encourage it to re-check for icons by deleting the contents of the following folder:

~/Library/Safari/Template Icons

And then restarting Safari.

Solution 2:

Unpin any pins you want to reload then restart safari. Click on the 'go' menu in the finder toolbar and hold down the option key, this reveals the hidden Library directory.

Navigate to the safari directory in the library folder and delete the template icons folder.

This resets the cache safari keeps for icons.

Start Safari and pin away!

Solution 3:

Open Safari, click "Safari", "Clear History...", then click the button "Clear History".

Screenshot

That worked for me.