Mobile app version of vmapp.org
Login or Join
Tiffany637

: How do you set Mac Safari's favorite icon Some Site, when added to favorite, will show an icon here like github.com: How do you set the icon here? I've tried this code and it doesn't work:

@Tiffany637

Posted in: #Html #Mac #Safari

Some Site, when added to favorite, will show an icon here like github.com:



How do you set the icon here?

I've tried this code and it doesn't work:

<link rel="apple-touch-icon" sizes="57x57" href="../apple_touch_icon_57_57.png" />
<link rel="apple-touch-icon" sizes="114x114" href="../apple_touch_icon_114_114.png" />
<link rel="apple-touch-icon" sizes="72x72" href="../apple_touch_icon_72_72.png" />
<link rel="apple-touch-icon" sizes="144x144" href="../apple_touch_icon_144_144.png" />
<link rel="apple-touch-icon" sizes="60x60" href="../apple_touch_icon_60_60.png" />
<link rel="apple-touch-icon" sizes="120x120" href="../apple_touch_icon_120_120.png" />
<link rel="apple-touch-icon" sizes="152x152" href="../apple_touch_icon_152_152.png" />
<link rel="icon" type="image/png" sizes="16x16" href="../favicon_16_16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="../favicon_32_32.png" />
<link rel="icon" type="image/png" sizes="96x96" href="../favicon_96_96.png" />
<link rel="icon" type="image/png" sizes="160x160" href="../favicon_160_160.png" />
<link rel="icon" type="image/png" sizes="192x192" href="../favicon_192_192.png" />

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Tiffany637

1 Comments

Sorted by latest first Latest Oldest Best

 

@Radia820

It looks like your url path for the actual icons are incorrect. Currently you are using ../ which means that your file is located up a level. I.e if you browsed example.com/home/ and assuming you had the icons in the root then it would work... but visiting just example.com would not work since ../ does not exist because you can't go any higher than the root.

The fix would be to copy all files into the root / and then use /example.jpg or if you would like the icons in a folder then use the absolute path i.e.

<link rel="apple-touch-icon" sizes="57x57" href="http://example.com/images/image.png" />

Let me know if this is the problem otherwise I'll remove this, since you haven't supplied us with the URL its guessing.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme