Solved

ASP.NET - Favicon not displaying in IE9

Posted on 2012-04-12
5
1,038 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bound data table problem 2 33
100% tall div not scrollable on iPhone 3 20
Install IIS7.5 on Windows Sever 2012 R2 4 23
How to repeat the data 4 17
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

839 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