Solved

ASP.NET - Favicon not displaying in IE9

Posted on 2012-04-12
5
1,022 Views
Last Modified: 2012-04-12
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
Comment
Question by:CipherIS
  • 3
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
Lalit Chandra earned 500 total points
ID: 37838810
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
 
LVL 1

Author Comment

by:CipherIS
ID: 37839193
Did not work
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37839200
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
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37839828
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
 
LVL 1

Author Closing Comment

by:CipherIS
ID: 37840019
cleared out cache seems to be working
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now