Solved

ASP.NET favicon.ico

Posted on 2012-03-26
13
637 Views
Last Modified: 2012-04-03
I am tyring to get the favicon.ico to work on master pages.  I used the following code but the icon is not displaying on the tab.  How do i get this to work?

<head runat="server">

    <title>My Website</title>

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

</head>
0
Comment
Question by:CipherIS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
13 Comments
 
LVL 13

Expert Comment

by:Ashok
ID: 37766885
After making this change, make sure to refresh BROWSER.

Right click on the icon.
Click on properties.
Click on “Details” tab.
Check “Bit depth” properties.
It should be “32” to display in IE 9.

I have done this for few websites, but have to look it up when I go home.

HTH
Ashok
0
 
LVL 13

Expert Comment

by:Ashok
ID: 37766902
For IE 7

in web.config

<staticContent>
            <clientCache cacheControlMode="NoControl" />
</staticContent>

HTH
Ashok
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37766910
it was already 32 bit depth
0
Independent Software Vendors: 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!

 
LVL 13

Accepted Solution

by:
Ashok earned 500 total points
ID: 37766922
Here are some notes form http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_24596854.html

I am surprised that Mozilla, Chrome and Safari display the favicon.ico. They do not understand the Microsoft specific ICO format. Did you perhaps create a favicon.ico file that is actually a PNG, JPG or GIF? Because Microsoft browsers will not show that correctly.

To set this up well you need to:

1. Create an ICO file and a PNG (or JPG) file
2. Create one <link> for the ICO and one for the PNG
3. If your site is under a sub path (most are) you must often use a full link for Internet explorer.

For one of my blog sites http://www.undermyhat.org I solved it as follows.

Note that simply emptying your cache is not always enough for favicons. Your best bet in seeing this change in your browser is:

1. Go to about:blank and close all tabs
2. Empty all cache
3. Close the browser
4. Reopen and go to your page
0
 
LVL 13

Expert Comment

by:Ashok
ID: 37766930
what is web browser's version?
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37767054
IE9 and Firefox 11.

BTW - above is not working
0
 
LVL 13

Expert Comment

by:Ashok
ID: 37767156
Make sure you create PNG file.

Renaming image file to .PNG will not work.
I think it should be PNG type image.

Ashok
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37767166
This is the link on this page you're reading:  <link rel="shortcut icon" href="/images/experts-exchange/favicon.ico" type="image/x-icon" />

And this shorter form is what I use, works in all browsers:  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
0
 
LVL 13

Expert Comment

by:Ashok
ID: 37767184
follow this link

http://www.hypergurl.com/favicon.html

you may have to download & use IrfanView
0
 
LVL 13

Expert Comment

by:Ashok
ID: 37767202
file size of icon shoul not exceed 150 KB
0
 
LVL 13

Expert Comment

by:Ashok
ID: 37767232
Browser specific notes
Internet Explorer supports favicons since version 5.0. It is actually quite hard to make IE5 or IE6 show the favicon. If the icon is not showing, try one of the following:

Add the page to your favorites. If you already have the page in your favorites folder, remove it and add it again.
Make sure, the icon file is called favicon.ico and it is placed in the root folder of your web server.
Make sure, the path to the favicon in the header of your page is absolute, not relative.
Delete your temporary internet files. If the folder with temporary files has reached its maximum, the favicon may not be used.
If your favicon is still not showing, leave us a comment below.
Later versions of Internet Explorer improve support for favicons and it is

Frequent problems and solutions

If you have changed the icon on your web you see an old icon (or no icon) in your browser, refresh the page or clear the cache. If you do not know how to clear the cache and you still see the old icon, try testing your web from another computer. You can ask your pals on your favorite discussion board if they see your new favicon.
Do not rename .bmp to .ico. I really mean it. You need to convert picture to icon using one of the methods described above. While Firefox will accept this fake .ico, others may not.
Once more: if you can, have the favicon available on url www.yourserver.com/favicon.ico with correct headers. It will save you a lot of troubles. Test if your favicon is accessible by putting its url in the address box. It should either be displayed in the browser as picture or the download dialog should appear. If you see gibberish text instead, your web browser is not configured properly to handle .ico files.
Icons (.ico files) may contain multiple images with different sizes and different color depths. If your favicon contains multiple images and you only change one of them, you may not see the change in your browser, because it shows you a different image from the .ico file.
Favicons do not work in some browsers if you test them locally by opening a .html file (without a web server).
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37768280
my icon is an actual icon named favicon.ico.

It works with HTML
but it is now working in ASP.NET.
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37768371
I resolved it.  This is how I resolved it

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

Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

740 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