Go Premium for a chance to win a PS4. Enter to Win

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1096
  • Last Modified:

ASP.NET - Favicon not displaying in IE9

I developed an ASP.NET website.  I hosted it on the server.  When I run the website locally I can see the favicon.  When I access my server via URL it doesn't display in IE9.  Works in FF and Chrome though.  I created an index.html file and I can see the icon displayed in IE.

Any ideas how to resolve?

    <link rel="shortcut icon" href="images/favicon.ico" type="image/ico" />
    <link rel="icon" href="images/favicon.ico" type="image/ico" />
  • 3
  • 2
1 Solution
Lalit ChandraCommented:
Use the following code in the <head> section of the my custom master page, directly below the meta content information:

 <link rel="SHORTCUT ICON" href="/PublishingImages/layout/favicon.ico" type="image/x-icon" />
It seems to work okay in IE. I think having the type="image/x-icon" is the key?

You may need to clear your cache initially,

CipherISAuthor Commented:
Did not work
CipherISAuthor Commented:
Here is my code

<head runat="server">
    <title>My Web Page</title>

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

Open in new window

Lalit ChandraCommented:
Try placing a ~ and set the link elements to runat=server

 <link  runat="server"  rel="shortcut icon" href="~/images/favicon.ico" type="image/x-icon" />
    <link  runat="server"  rel="icon" href="~/images/favicon.ico" type="image/x-icon" />

This also needs to be done in the <head> section of the page.
CipherISAuthor Commented:
cleared out cache seems to be working

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now