Search code examples
htmlfavicon

Displaying a Favicon using recommended code is not working


I have "Googled" this quite a bit in the past hour.

I am working on a new website, and I've never used favicons before (I always forget about them). So, the first place I looked was Google, and the first result that came up was this one:

How To Add A Favicon To Your Site (W3.org)

And after trying out the first two options, and re-uploading the files to the server I have found that neither of the snippets of code on that page listed above work for me. I have double-checked that all references to the favicon are correct and that all files are in the right places. I have even tried using a .PNG file instead of an actual icon (.ico), which I have seen in use on other sites.

Then, I went back to Google and looked at a few more sites, and tried the code in those tutorials. It worked! Well, kind of... It worked in Flock web browser, FireFox, and Chrome. But it didn't work in Internet Explorer 9, 8, 7, or 6.

I then came over here to S/O, and "View Source"'d the homepage and used their favicon code and that still didn't work!

Here's the latest piece of code that I have now:

<link rel="shortcut icon" href="http://mywebsite.com/favicon.ico">

What is the most reliable way of ensuring my Favicon displays in every browser?



Updates


  1. Tried Bookmarking the page - Didn't work.

Solution

  • Favicons are really annoying to recieve because they cache. Try using another computer and navigating to domain.com/favico.(png/ico)