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

x
  • 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?

<code>
    <link rel="shortcut icon" href="images/favicon.ico" type="image/ico" />
    <link rel="icon" href="images/favicon.ico" type="image/ico" />
</code>
0
CipherIS
Asked:
CipherIS
  • 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,

Ref:
http://social.msdn.microsoft.com/Forums/nl-BE/sharepointcustomization/thread/9f81f991-d69b-4234-b019-ead0a97c9ff2
0
 
CipherISAuthor Commented:
Did not work
0
 
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

0
 
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.
0
 
CipherISAuthor Commented:
cleared out cache seems to be working
0

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