I combined with imagemagick 5 .png files to make one favicon.ico file, the sizes were 16×16, 32×32, 64×64, 96×96, 144×144.
Is it okay to use this code
<link rel="icon" href="/favicon.ico">
or
<link rel="icon" sizes="16x16 32x32 64x64 96x96 144x144" href="/favicon.ico">
or
<link rel="icon" sizes="16x16" sizes="32x32" sizes="64x64" sizes="96x96" sizes="144x144" href="/favicon.ico">
I have tried them all but I am not sure which is the correct/proper one
2
Answers
Favicons are different for different browsers and devices.
So you should be able to specify the favicons sizes using the following HTML individially:
You can safely use this:
However, you probably lack PNG icons.
favicon.ico
is an old artifact, originally introduced by Internet Explorer. It has been replaced long ago with PNG icons. Whilefavicon.ico
is still useful, you should not rely on it to implement the favicon of a modern website.I suggest you to:
Even with these icons, you still lack a few icons to fully support all platforms, such as iOS. You can generate them all, along with HTML code, with RealFaviconGenerator (I’m the author of this service).