JustBlossom
JustBlossom

Reputation: 1329

ICO or PNG favicon won't show in IE11

I have done a lot of digging, but I can't seem to get a favicon working for IE11. I can get one working in Chrome and Firefox though.

Here is the head of my file:

<head>
    <title>Home</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script src="../jquery.min.js"></script>
      <script src="../levelOneImports.js"></script>  
      <link rel="shortcut icon" href="../Iconleak-Cerulean-Science-chemistry.ico" type="image/x-icon">
</head>

Here are the different approaches I've tried:

I am not sure what I could be doing wrong. Any suggestions? If you could provide an example of some code where it works in IE too, that would be great.

Don't know if this helps, but I'm not too concerned with anything prior to IE11.

Upvotes: 1

Views: 3074

Answers (2)

philippe_b
philippe_b

Reputation: 41318

Even if you cleared the cache, IE11 might still use the cached version. This is an unfortunate, well known-behavior.

A non-exhaustive checklist:

  • In IE11, open the developer console and look for errors. You might typically discover a 404 error while accessing the icon.
  • Version the icon by adding a query string to the URL. For example, in your HTML code, change the icon path to ../Iconleak-Cerulean-Science-chemistry.ico?v=2. This should force IE11 to reload the icon.
  • Test your site with the favicon checker. Full disclosure: I'm the author of this service.

Upvotes: 1

RDumais
RDumais

Reputation: 181

You can change it with JavaScript. It may not be the best answer, but it should work. Be sure to check the link below and their example. Let me know how this works for you:

How to force ie11 to request a new favicon?

Upvotes: 0

Related Questions