7

I have a favicon , favicon.png in directory - img/favicon/favicon.png

<link rel="icon" type="image/png" href="img/favicon/favicon.png" /> 
<link rel="shortcut icon" type="image/x-icon" href="img/favicon/favicon.png" />

In chrome , firefox etc it shows correctly, in IE9 it doesnt show, where the favicon should be it shows the internet explorer logo. Is there any reason why IE9 is wont show the png?

Henrick
  • 170
  • 1
  • 1
  • 9
  • 2
    It sometimes takes favicons a while to load. Clear the cache, reset the browser, and wait for a couple of seconds on the page – jacktheripper Feb 16 '12 at 13:37
  • No joy with this , I also changed the directory its in to the root directory and also put a favicon.ico in the root directory aswell (although i have left the linked favicon as png) and its not getting picked up by IE9 – Henrick Feb 16 '12 at 16:06
  • Have you tried on a different server? Or can you link us the site so that we can expect it? – jacktheripper Feb 16 '12 at 16:50
  • Haven't tried on a different server but now its picking up .ico as the favicon, I still have the png linked as I have it in the original question above. I have the favicon.ico in the root folder. Is there an issue with IE picking up the .ico instead of .png ? I also need two different versions of the favicon, one for the site and then a different image for the about section on my google profile (it picks up the .ico version). – Henrick Feb 16 '12 at 17:37
  • 1
    That is because it isn't supported in IE10 or before - see **[Which versions of IE support PNG favicons?](http://stackoverflow.com/questions/16943609/which-versions-of-ie-support-png-favicons)** – dsgriffin Feb 03 '14 at 15:55

7 Answers7

8

The reason why it isn't working is that all favicons must be in .ico form. You can convert it here. By default, the browser scans for a file in the same directory called favicon.ico and displays that.

jacktheripper
  • 13,953
  • 12
  • 57
  • 93
  • 1
    Apologies for the delay in replying. Is it not possible to link to the png in the and use that as the favicon and then have an ico in the root directory not linked. I have them both anyway. Firefox and Chrome display the png no problem, IE does not display the png or the ico – Henrick Feb 20 '12 at 15:02
6

The W3C method does not seem to agree with IE9:

» W3C method here

Not sure what's going on here. Can't get an icon to show up in IE9 regardless of method, and I've tried them all, emptied the cache, etc. Mainly responding to this thread to point out that the W3C method differs from what jacktheripper posted in February.

Brad Kelley
  • 86
  • 1
  • 1
3

Internet Explorer does not support PNG favicons. The other major browsers support both PNG and ICO formats. For best results, use the ICO format.

Convert a PNG favicon to ICO here: http://www.favicon.cc/

More info on Wikipedia here: http://en.wikipedia.org/wiki/Favicon

scuds
  • 73
  • 1
  • 8
1

By any chance, is your site password protected via a 401 (Basic Authentication)?

I discovered that this can also be a reason why favicons won't show up in your browser. I discovered this the hard way ;)

Chrome and Firefox handles this well though. It is just IE9 that is a bit quirky in this regard.

Ardee Aram
  • 4,740
  • 8
  • 36
  • 37
0

Internet explorer (all versions from 5) only supports .ico files for favicon

Source: wikipedia. See also: another answer.

Community
  • 1
  • 1
Hashbrown
  • 12,091
  • 8
  • 72
  • 95
0

If you want to use .ico with Internet explorer you will have to use .ico files for favicon. I will not work any other way. There are a lot of great free tools that you can use. Here are two links to website that will do the job:

Free Ico Converter Favicon Converter

After you convert it you will have to use it by placing it in your root folder of your website.

Hope it will help you.

Donnie
  • 1
0

Based on this forum, I would say the key is <link type="image/png" href="/images/site/favicon.png" rel="icon">

type="image/png" or rel="icon" may help.

Andrew
  • 946
  • 9
  • 19
  • I have type="image/png" and rel="icon" already. I also changed the directory its in to the root directory and also put a favicon.ico here aswell (although i have left the linked favicon as png) and its not getting picked up by IE9 – Henrick Feb 16 '12 at 16:05
  • Sorry about that, I see what you mean. There's another [Stackoverflow.com answer](http://stackoverflow.com/a/1344379/639505) that may help. It doesn't address the issue you're facing, but it points out that using an ico file may be just as good as a png since both allow alpha transparency. – Andrew Feb 16 '12 at 22:06