Question

I am trying tp put favicon in masterpage but its not showing on browser, VS shows no error

Master page code

     <head runat="server">
            <title>My Test Application</title>
            <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
            <link id="Link1" runat="server" rel="shortcut icon" href="~/favicon.ico" type="image/x-icon" />
            <link id="Link2" runat="server" rel="icon" href="~/favicon.ico" type="image/ico" />
            <asp:ContentPlaceHolder ID="HeadContent" runat="server">
            </asp:ContentPlaceHolder>
    </head>
Was it helpful?

Solution

Replace this:

<link id="Link1" runat="server" rel="shortcut icon" href="~/favicon.ico" type="image/x-icon" />
<link id="Link2" runat="server" rel="icon" href="~/favicon.ico" type="image/ico" />

With

<link rel="shortcut icon" type="image/x-icon" href="~/favicon.ico" />

You can download standard icon here.

http://www.iconarchive.com

OTHER TIPS

Just copy your favicon.ico to root older while deploying. And clear all your browser cookies before testing. It will surely show up.

You could try this

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top