Reputation: 220
Favicon icon is showing at chrome, mozilla firefox and i tried other browsers too but it is not showing in IE 9. I am unable to locate where the problem is.
I pasted the code below inside head tag inside MasterPage(using Visual Studio)
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
<title>DemoPage</title>
<link href="css/patrika.min.css" rel="stylesheet" />
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
But favicon is still not shown in IE 9. Is there any other way to do it.. or i am doing something wrong because it works very well on other browsers - chrome,firefox..
Upvotes: 0
Views: 957
Reputation: 220
Well guys! Thanks for your answer and support!!
I got the solution now We have to add like this inside head tag
<link rel="shortcut icon" href="~/favi.ico" type="text/x-html-insertion" />
Favicon is now working in IE 9 too. Hope this will going to helpful at your end in future as well.
Upvotes: 1
Reputation: 7471
Use full path for icon
<link rel="shortcut icon" href="http://www.yourdomain.com/images/favicon.ico" type="image/x-icon" />
Upvotes: 0
Reputation: 103335
For the most consistent results, use an absolute path to the favicon.ico file in your domain root folder:
<link href="//yourdomain/favicon.ico" rel="shortcut icon" type="image/x-icon" />
Other cases you have to check as well are: 1. Are you renaming a jpg to ico? If so, create the file as an ico and it will wok as expected. 2. If the site is a closed one and requires log in, the icon will not be displayed. Add an exception for the favicon.ico in the web.config:
<location path="favicon.ico">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
Upvotes: 3
Reputation: 76578
Look at the acces log file of your webbrowser. You can actually see where the various browsers do look for a favicon.ico file, then put it there were IE9 is looking for it.
Some browsers were notoriously hard to trigger re-reading the favicon.ico file if they had not done so on first try. So make sure you see that it is trying to retrieve, including restarting the browser and if necessary clearing its cache.
Upvotes: 1
Reputation: 357
Just refresh the page or delete the cache and refresh it there is no difference between browsers for favicon.
Upvotes: -1