Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

favicon not working in IE

I have a site using a custom favicon.ico. The favicon displays as expected in all browsers except IE. When trying to display the favicon in IE, I get the big red x; when displaying the favicon in another browser, it displays just fine. The page source includes and it does work in other browsers. Thanks for your thoughts.

EDIT: SOLVED: The source of the issue was the file was a jpg renamed to ico. I created the file as an ico and it is working as expected. Thanks for your input.

like image 412
augiesarmy Avatar asked Sep 23 '08 16:09

augiesarmy


People also ask

Why is the favicon not working?

When you add a favicon to your site, it may not show up since your browser has 'saved' your site as one without a favicon. You need to clear the cache in your browser or use a different browser.

How do I activate favicon?

To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon.ico".


2 Answers

Right you've not been that helpful (providing source would be have been really useful!) but here you go... Some things to check:

Is the code like this:

<link rel="icon" href="http://www.example.com/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="http://www.example.com/favicon.ico" type="image/x-icon" /> 

Is it in the <head>?

Is the image a real ico file? (renaming a bitmap is not a real .ico! Mildly different format)

Does it work when you add the page as a bookmark?

like image 79
Oli Avatar answered Sep 20 '22 15:09

Oli


In IE and FireFox the favicon.ico is only being requested at the first page visited on the site, which means that if the favicon.ico requires log-in (for example your site is a closed site and requires log in) then the icon will not be displayed.

The solution is to add an exception for the favicon.ico, for example in ASP.Net you add in the web.config:

<location path="favicon.ico">   <system.web>      <authorization>        <allow users="*" />      </authorization>   </system.web> </location>  
like image 42
yoel halb Avatar answered Sep 16 '22 15:09

yoel halb