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

8

2

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?

Caesium

Posted 2015-09-18T16:08:35.710

Reputation: 301

Answers

12

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.

Caesium

Posted 2015-09-18T16:08:35.710

Reputation: 301

1That directory doesn't exist for me? – Jonathon Hill – 2015-11-25T17:28:33.793

This directory won't be created until a pinned site has downloaded a pinned icon. Try Apple's website to kickstart it. – mix3d – 2017-03-21T01:46:59.347

I disagree with that method, most Users cannot access that folder without special commands. See "Clear History" answer by @Flimm – Sebastian Scholle – 2019-05-06T09:34:53.650

1

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!

Julianna Green

Posted 2015-09-18T16:08:35.710

Reputation: 11

1

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

Screenshot

That worked for me.

Flimm

Posted 2015-09-18T16:08:35.710

Reputation: 6 317

0

  1. Open Safari > Develop > Empty Caches.
  2. Refresh the page

Note: If you don’t see the Develop menu in the menu bar, choose Safari > Preferences, click Advanced, then select “Show Develop menu in menu bar.”

That did the trick for me ;)

ian

Posted 2015-09-18T16:08:35.710

Reputation: 101