...

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



code beginner
04-17-2010, 10:34 PM
hello,

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.

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

Apostropartheid
04-18-2010, 11:09 PM
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.

instaunt
04-24-2010, 10: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">

LynxSI
05-07-2010, 06: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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum