I have provided <link rel="shortcut icon" href="~/Images/logo.gif" /> in my layout but i wish to replace the favicon on all the pages, even where layout is not used. I replaced the favicon file with my favicon (present in the root folder) still it loads the default favicon on pages without layout. What more needs to be changed in order to get my favicon. a similar but slightly different question has already been asked but isnt answered by anyone.link

有帮助吗?

解决方案

  1. It's better to convert your .gif to .ico, you can do this online
  2. It's a convention to rename the icon to 'favicon.ico'

You can find more information on Wikipedia - look at the section 'How to use'

Your html should look like:

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

Check Mark Gravell's solution here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top