Support » Fixing WordPress » Fav Icon?
Fav Icon?
-
Where abouts do I place my favicon? I’d really love to get rid of my browsers default.
Thanks.
-
Favicon from http://tools.dynamicdrive.com/favicon/ 16 x 16 plus transparency – use this for transparencies. Unzip and post in root e.g mysite.com/favicon
Put this in <head> </head> section of all pages
<link rel="icon" href="http://www.mysite/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="http://www.mysite/favicon.ico" type="image/x-icon" />
Actually, you only need this line:
<link rel="shortcut icon" href="http://example.com/favicon.ico" type="image/x-icon" />
The “icon” only line is unnecessary, the “shortcut icon” line works in all current browsers.
And ideally, it would be better to use the “image/vnd.microsoft.icon” for the type field, the old “x-icon” is only for compatibility purposes and older browsers.
Thanks so much guys!
Live and learn.
From Otto42 above, http://3spots.blogspot.com/2006/04/favicons-codes-tools-resource.html and from Wikipedia http://en.wikipedia.org/wiki/Favicon I get this
<link rel="shortcut icon" href="http://example.com/favicon.ico" type="image/vnd.microsoft.icon" /> <link rel="icon" href="http://example.com/images/favicon.gif" type="image/gif" />
Does that look reasonable?
As I understand it the first line will be a standard favicon for older browsers, whilst the second line will offer an alternative gif not necessarily in the root
Well, that’s actually a bit confusing. Here’s the breakdown:
The standard says that this should work:
<link rel="icon" href="http://example.com/images/favicon.ext" type="image/whatever" />
You can use any sort of image as long as you use the right MIME type.
However, certain older browsers (IE) can’t deal with anything but ICO files. And certain older browsers (again, IE) expect “shortcut icon”. And then certain older browsers (do you see where I’m going with this?) can’t deal with “image/vnd.microsoft.icon” types. And then again, certain older browsers (sigh) can’t handle anything but “favicon.ico” in the root directory of the site.
For full compatibility, this always works:
<link rel="shortcut icon" href="http://example.com/favicon.ico" type="image/x-icon" />
If you don’t care about anything older than current browsers, using just “icon” and any image file type in any location will work fine.
Note that specifying two different icons is not recommended in any case, because then it’s confusing.
Thank you!
Can’t be done. This is way too confusing.
- The topic ‘Fav Icon?’ is closed to new replies.