Welcome to WebmasterWorld Guest from 54.161.108.58

Forum Moderators: incrediBILL

Message Too Old, No Replies

Favicon Questions

link tag, color depth, browser differences

     
10:52 pm on Feb 8, 2005 (gmt 0)

New User

10+ Year Member

joined:Feb 9, 2004
posts:19
votes: 0


I finally decided to add a favicon to my site and am a bit confused about a few things.

Are link tags in the head section of the pages really necessary? When I tried to view the pages on my local server the favicon would not load without the tag. But when viewing my actual website online the favicon loads fine even though none of the pages contain the link tag yet. Also prior to adding the favicon I had bad requests in my online log files for the favicon indicating that the link tag is not necessary?

I also found that my favicon looks great in my Opera 8 and Firefox 1, but in IE 6 there is a drastic color shift even thought the browsers are all on the same computer with 32 bit color. My favicon in 16x16 and 256 colors which I thought was correct.

I seem to also have problems with favicons in general in IE on both my computers (WinXP,Win2000). They display in the address bar, but are not stored with bookmarked pages. I looked in the settings but didn't see anything that would be causing that. I am not all that familiar with the quirks of IE because I try to avoid it like the plague :)

4:35 am on Feb 9, 2005 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 4, 2002
posts:385
votes: 0


You've asked a couple of interesting questions.

A Microsoft page [msdn.microsoft.com] says this:


After creating the icon, you must associate it with your Web page. One way is to save the icon with the default file name of favicon.ico in the root directory of your domain—for example, www.myDOMAIN.com/favicon.ico. Each time your Web page is added to a user's favorites, Internet Explorer automatically searches for this file and places the icon next to all the favorites and quick links originating from your site.

You can also associate the icon with your Web page by saving the icon with a file name other than favicon.ico and adding a line of HTML code in the head section of your Web document. The line of code includes a link tag that specifies the location and name of the file. You can include this link tag on a per-page basis.

<LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico">

So, you've guessed right with IE. I've read that Mozilla browsers require the link tag, but that might be old info.

The quote by MS makes it sound like IE loves favicon files. The truth is that the IE browser doesn't handle favicons well. Many favicons don't show up when they're supposed to. Sometimes it seems like MS's favicons show up better than my own. Go figure.

I doubt that I can help you with the color shift. How did you make your favicon? Something in that process might be the problem.

Some have used .png files with the link tag for Netscape and other browsers, and a .ico file for IE. I'm not sure why they do that, but IE is supposed to have a bug in handling png color. Hmm...that might be your problem.

5:54 am on Feb 9, 2005 (gmt 0)

New User

10+ Year Member

joined:Feb 9, 2004
posts:19
votes: 0


Ah hah!

I found out a few things that might explain the IE quirks at least. I read somewhere that if you click and drag to the right a few times the default IE favicon in the address bar that it will refresh it and get the favicon! It worked but the favicon was still not being saved with the bookmark. I noticed that all my IE favorites had the .url extension on them which I found a bit weird. On a whim I tried changing my default browser back to IE and instantly the favicons appeared on the bookmarks and the .url extension disappeared. It still took a few of the click and drag tricks to get the favicon to display in the first place but it works. I guess IE just doesn't like it if its not the default browser!

The color shift thing hasn't happened again so I'm thinking maybe it was a fluke of some kind. The favicon was made with a gif file so I don't think the file format was the problem. I didn't know about the issues with png, but I will keep it in mind for the future.

I still am confused about the link tag thing. From what I have observed the tag is not necessary in any current browser when the page is loaded from my website online which runs on IIS. But when I try to view it in the same browsers on my local machine through MY copy of IIS, it will only load the favicon if the link tag is present. I don't really get why it does that. Not really a big deal I guess, but these types of things peak my curiosity :)

11:03 pm on Feb 9, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 6, 2003
posts:661
votes: 0


The link tag may not be necessary with certain browsers. But it's needed for others.

You do no harm - and some good - by including it.

5:38 am on Feb 11, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 16, 2004
posts:693
votes: 0


It's really a futile thing anyway. I use one also. The problem is that in IE if you clear the history cache you lose all the favicons with it. So even if someone does have your cool favicon on their browser it will revert back to default when history is cleared.
4:01 am on Feb 12, 2005 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 19, 2004
posts:562
votes: 0


I read somewhere that if you click and drag to the right a few times the default IE favicon in the address bar that it will refresh it and get the favicon!

I found the same tip and it works great. Now if I can just somehow get all the IE users who view my site to do the same.:)

4:08 pm on Feb 14, 2005 (gmt 0)

New User

10+ Year Member

joined:Jan 20, 2005
posts:15
votes: 0


I use a favico with my site in the default location siteroot/favicon.ico. It is the default size 16x16 and I don't like to it at all and it works with both IE6 and FF 1.0, I don't remember if it worked for older versions or not. But TheDoctor is right putting in the link tag can't hurt anything so there is no reason to not put it in.

I've never heard about the clicking and draging trick before but if it works use it. But if that doesn't always work another thing that might help is if you bookmarked the site before the favicon was there IE won't recognize that one has been put there. You may have to delete the bookmark and clear your cache then try it again but this doesn't always work either.

I have heard that a 32x32 px icon should work too, can anyone confirm this?

6:48 pm on Feb 14, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


A favicon file is actually a lbrary file that can hold several icons - for different resolutions, color depths, etc. So including a 32x32 icon for the cases where a shortcut is dragged onto a Desktop, etc. is a good idea.

But the usual size in a browser GUI is 16x16 a I wouldn't tust the OS to resize a big file with aceptable results.

7:23 pm on Feb 14, 2005 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 4, 2002
posts:385
votes: 0


How do you put several different favicon images (different sizes) in the .ico library? I've never seen a way to do that in the programs I've used.
2:01 am on Feb 15, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


I use Icon Forge - and in that app inserting several icons in one .ico file is a pretty straightforward operation.

Most Windows icons and program icons inlude a large and small version of each - perhaps more ("view large/small icons" is a regular option in the Windows GUI) so most programs to generate icons need to do this.

However, I suppose there are programs on the market that are specifically devoted to just the favicon and no icons in general - and they may not offer the option.