Forum Moderators: open
I have tried the <link rel='icon' href='/favicon.ico'>, but it doesn't help, I guess because I'm not using a mozzilla browser? I'm using IE6.0, as I am sure many people are.
So the question is, how do I get favicons to show up? And how come Yahoo's favicon always seems to be on my computer, but I can't get mine to work?
Argggh... Thanks for any help.
Have you tried looking at the site in question on a different machine? Sometimes, including the favicon call after you have already browsed to that page means that it will not render. Also, are you an a *nix server? The / in front if the favicon.ico call seems a little odd to me!
The other way to use favicon is to have it instead of the IE icon in your bookmarks.
So what is it really you want to have?
<link rel="shortcut icon" href="http://www.mydomain.org/mygraphics/myicon.ico">
Netscape7.0 has added favicon support. Netscape7 requests favicon.ico from the server every time a tab in the browser window displaying the page is given focus (regardless of the browser or proxy caches). However, Netscape7 does not appear to heed the shortcut icon tag shown above - it always requests favicon.ico. Webmasters who use custom favicon tags should make sure to have both the default favicon.ico file and their custom favicon file on their servers (an internal redirect will work). Because it requests the favicon so often, Netscape7 does not "lose" favicons.
Mozilla1.1 seems to have corrected the problem with requesting favicon.ico whenever the displaying window tab is given focus. It also appears to support custom favicon file names. However, I can't get it to display Yahoo's favicon, so I think it may "lose" favicons as well.
Netscape's next release is likely to have the same favicon behaviour as this current Mozilla release.
At first glance, Opera6.03 doesn't seem to support favicons.
So, two browsers "lose" favicons but support custom names, another one won't lose them, but reloads them constantly and makes you use the default favicon name, and one still does not support them. All-in-all, pretty poor support for favicons... :(
Jim
No, they won't if the UA is Mozilla or Netscape7. :(
We'll have to take the IE Favorites bookmark event numbers and calculate a "probable" number of Mozilla and Netscape bookmarks by using the visitor ratio of the browsers - just like we do for the other non-favicon-enabled browsers.
Favicon support is a kludge.
Jim
I guess what I mean is:
is there any way to ignore the way Moz1.1 keeps requesting the custom icon? If there's nothing like:
<link HREF="http://www.mysite.com/customicon.ico" REL="SHORTCUT ICON">
then what does it fetch? or try to fetch?
And what does it fetch if that code is there?
Will our average visitors know how to do this? Nope. (I'm being polite)
Jim
Probably because of what I know of MSIE.
MSIE:
Someone bookmarks the page, it looks for favicon.ico in the current directory, if 404, then tries to fetch /favicon.ico, and some versions are different, I think. Lemme know if I'm wrong.
NS/Moz: (Excluding META tag reference, I'm assuming webmasters put favicon.ico in the root folder, assuming MSIE as the major browser)
Are you saying that every tabbed page, or for that matter, any open page, that the new NS7/Moz1 will try to fetch favicon.ico in that same folder? and failing that will it look for /favicon.ico as MSIE does? I'm trying to see what the logic of their program is. What is the action or sequence of events on a 404 error looking up favicon.ico? (Excluding the META tag reference) Is this documented anywhere?
Well, you've got me there - I'll have to try that and see exactly how Moz/NS works with respect to /favicon.ico if favicon.ico is not found. Since I use the "custom" favicon tag, I have not investigated that branch of the mystery yet. Unless our asia/pacific members beat me to it, I'll play with it tomorrow (it's late in Texas).
Jim
<link rel="shortcut icon" href="http://www.domain.com/favicon.ico">
<link rel="icon" type="image/png" href="http://www.domain.com/favicon.png">
The first line is for IE, the second is for Mozilla and all the rest.
We also discovered that it appears on IE only after you add a page into Favourites, close the window and reload this page. Mozilla shows it from the first time, without any additional actions.
By the way, did anybody try to change the name from favicon.ico to something else (we didn't try it)? All the examples we saw are the same.
Well, that's lousy news. No longer will favicon requests be a sign of anything at all.
Some good news...
Adding the "new" icon tag posted by starway -
<link rel="icon" type="image/ico" href="http://www.domain.com/favicon.ico">
seems to cure the problem of Netscape7 requesting the favicon.ico every time focus is given to the browser tab displaying the page containing that icon. I added the tag, and I no longer see these requests in the server log file.
Thanks starway!
Jim
starway - In IE it is not necessary to use the tag at all. Explorer will automatically look in the root directory for the favicon.ico file whenever a page is saved to favorites. The tag is usually just used to either direct the favicon.ico path for those pages not in the root directory, or to use a custom image instead of the default favicon.ico.
But is it necessary to use this other tag for Mozilla?
Even with the favicon.png in the root directory, Mozila will not find it without that tag
As far as I know, the files should be in ICO format, not PNG. It's a special icon format which is really a potential library of several icon files. Favicons usually only include 1 image, but they can include more. However, I don't think a .png file will work at all.
I have used the favicon.ico, in the root directory, without a <link rel> tag, sucessfully for a couple years.
It is only now that I have ever heard any reference that there needs to be another file format and a special tag for non Windows machines. I actually never thought much about it.
I also suspect that in IE case we should add "Windows-only", because *.ico format does not exist on any other platform. - starway
I said that <link rel="shortcut icon"> is for IE, and <link rel="icon"> is for Mozilla/Netscape/Konqueror (maybe also for new Opera that will come soon?).
It's not for non-Windows machines. It's for all browsers except IE.
And it really works - tested in Mozilla 1.1 and Netscape 7 (but doesn't work in Netscape 6.2) on Windows. Favicon appeared only after we added <link rel="icon"> tag.
Also, I don't think that .png is the only format you can use for this. I cannot try to change it for .gif or .jpg now - I have no access to a server. Maybe somebody can test this and tell the result?
Using only the old tag only, NS7 would request "favicon.ico" every time I gave focus to the browser tab displaying a page with which the icon was associated. It was ignoring the old tag, and re-requesting the default favicon.ico from the server every time the tab got focus. This in spite of the fact that the icon was in the browser cache. When I added the new icon tag, NS7 began requesting and using the custom icon filename, and only requesting it only once - when the page was initially loaded.
So for now, I have two icon tags on each entry page that uses favicons:
<link rel="shortcut icon" href="http://www.mydomain.org/customicon.ico"> <!-- old tag -->
<link rel="icon" type="image/ico" href="http://www.mydomain.org/customicon.ico"> <!-- new tag -->
This works as expected, but is another example of the need for standards and backwards compatibility.
Jim
I've read that the best way to make a favicon is to BEGIN by creating a .png file. But then it must still be converted to .ico format. ICO is an IBM system format - lots of PC software comes with icon files in an ICO format.
I'm very willing to be proved wrong on this. There's certainly a lot of misinformation around about favicons, and I'd hate to help to spread any.
But I'm nearly 100% certain that favicons only support 1-bit transparency and .png supports 8-bit. That alone points away from using a .png file.