16

Alright, so my favicon isn't showing up for some reason. It's at image/favicon.ico (I've checked it like 5 times).

This is the code I use for it:

<link rel="shortcut icon" href="images/favicon.ico" />  

And this is the site: http://prime.programming-designs.com/

6
  • 2
    Shows up fine in IE8... amazingly. Nov 22, 2010 at 17:35
  • Works for me in Chrome 5 and Firefox 3.6
    – Pekka
    Nov 22, 2010 at 17:36
  • 1
    It's a fact that favicons do take a long time to change in almost all browsers, I've been through it many times, just be patient and one day you'll be surprised. For any new users that visit your site, they will see the new favicon :)
    – Kyle
    Nov 22, 2010 at 17:37
  • if you put it in the root directory it should show up without having to put the link in too. Also shows for me in FireFox, Chrome and Safari and opera.
    – jimplode
    Nov 22, 2010 at 17:38
  • Whenever I have issues with my favicon not showing up, I browse to it directly in the browser and force a reload.
    – drudge
    Nov 22, 2010 at 17:42

9 Answers 9

14

It's probably just cached in your browser, it shows up as a blue cross on mine.

Else, check your image path. image/favicon.ico isn't matching images/favicon.ico, but that is probably just a typo.

0
12

Late, however. I run into this problem more than I should. My fix is to add a 'version number' ?v1 or whatever, this will blow away cache.

<link rel="icon" href="favicon.ico?v1" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico?v1" type="image/x-icon" /> 
0
8

Remove the cache of your browser and reboot the browser. Might take a while to show up in for example FF

2
  • Worth a try although mine doesn't have a slash and it works fine. You could also try adding the type attribute: type="image/x-icon" although am not sure why that would make such a difference.
    – Ian Devlin
    Nov 22, 2010 at 17:37
  • 8
    @William try temporarily adding a query string: favicon.ico?1234567
    – Pekka
    Nov 22, 2010 at 17:39
4

Most browsers like IE will request /favicon.ico despite what you have set, but it should still work if you return the proper Content-Type and made it the right way.

You can attempt to do:

<link rel="shortcut icon" href="/images/favicon.ico?289349832" /> 

The query string usually forces the browser to re-request the resource since it's unique.

You can also attempt to do a server redirect from /favicon.ico to /images/favicon.ico

You can also just move /images/favicon.ico to the root.

However, browsers naturally really, really cache the crap out of favicons so my suggestion would be to wait, as most likely none of the above would help. In time it should show up on your browser.

2
  1. Load up http://prime.programming-designs.com/images/favicon.ico in your browser to 100% verify that the path is correct.
  2. Check the Content-Type header returned by the server. Some browsers might be oversensitive. You may have to register the MIME type for the .ico extension.
  3. As others have said, try clearing the browser cache.
0

I just renamed favicon to favicon1 and uploaded the changed files and it worked.

0

I had been having trouble with a particular page not displaying a favicon for a month or so, and it was really becoming quite annoying. I eventually worked out is because I tried to put the title inside a span, e.g.

<span id="title"><title>Page Title</title></span>

Everything else on the page worked perfectly, but the favicon refused to display!

1
  • is that <span> in the header? although this is a really old question and the problem was clearly not this.
    – Luciano
    Sep 15, 2021 at 12:55
0

This worked for me but when I changed the end to a .png or .ico .jpg etc, it starts work again

example:

<link rel="shortcut icon" type="image/png" href="image.png">
0

I was facing this issue with my favicon and tried all of the above and it still didn't work.

What I came to realize was my HTML markup was out of order. Somehow my <header> and favicon declaration were being rendered before my <html> tags!

Fixing this resolved the issue for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.