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
Asked
Active
Viewed 1.9k times
7
1 Answers
14
- It's better to convert your .gif to .ico, you can do this online
- 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
-
u can use gif image in mvc. it works in the pages using layout . it is rendered as ico only. i had placed favicon.ico in the root folder. it got solved just happend to be an issue with the server caching – Nikitesh Feb 03 '14 at 11:38
-
favion.ico was in the cache i think, i cleared it and it took the new icon. – Nikitesh Feb 03 '14 at 11:57
-
1– usefulBee Jul 17 '14 at 17:39
-
1if you use razor syntax you should take care of defining the href part with href="@Url.Content("~/favicon.ico")" – pavemann Feb 03 '16 at 10:24