View Full Version : "icon" vs. "shortcut icon" for favicon

code beginner
04-17-2010, 11:34 PM

should rel= be "icon" or "shortcut icon" for favicons?

I have favicons working in Firefox, but not IE. I have it typed as "icon" right now. But it looks like IE might want "shortcut icon" instead.

Does Firefox support "shortcut icon" for the favicon rel= description? Hopefully there is a description that will work for both Firefox and IE.

04-18-2010, 02:15 AM
Look here: http://en.wikipedia.org/wiki/Favicon

04-19-2010, 12:09 AM
The best way to link to a favicon is like this:

<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/favicon.ico"/>

It's best to use the two word value to allow all clients to access it.

04-24-2010, 11:22 AM
There's nothing stopping you from using both. I have these on all my sites and my favicon shows up in all browsers:

<link rel="shortcut icon" href="http://www.example.com/favicon.ico" type="image/vnd.microsoft.icon">
<link rel="icon" type="image/png" href="http://www.example.com/images/favicon.png">

05-07-2010, 07:09 PM
I second instaunt's post. I would use both. Officially not all browsers support Microsoft's icon format (although most seem ok with it in the current generation of browsers).

Plus for any browser that is ok with PNG you'll get better graphical output with true alpha channel support (semi-transparency).
- Ben