for some reason in the
head HTML document wrote:
& lt; link rel = "shortcut icon" href = "icon / favicon.ico" & gt;
Posted in the file “
Favicon.ico ” in the folder, but still the icon is not displayed!
Someone, tell me what is the reason, please.
Answer 1, Authority 100%
Well, firstly, you need to make sure that icon / favicon.ico is the right way to the icon. Well, if everything is in order, then the browser is to blame, i.e. cache. It happened. But try to deceive, in both cases helps, since the page code changes.
& lt; link rel = "shortcut icon" href = "icon / favicon.ico" type = "image / x -icon "/ & gt;
or so (set the absolute path)
& lt; link rel = "shortcut icon" href = "/ icon / favicon.ico" & gt;
What server do you have? If Apache, then Kint Favicon.ico in the site root and you will be happy.
Try like this:
& lt; link rel = "icon" href = "./ icon / favicon.ico" type = "image / x-icon" & gt;
Currently, what would simply insert the icon, it is enough to register how the above was told 1 line and throw the file to the server. But there are many scenarios in which the usual Favonka does not solve the tasks set, in addition to the answers, I can recommend a service that will easily prepare your image for all popular platforms.
I always insert as follows (usually a lie to the root of the site, where and index.html or index.php:
& lt; link href = "favicon.ico" REL = "icon" type = "image / x-icon" / & gt; & lt; link href = "favicon.ico" REL = "shortcut icon" type = "image / x-icon" / & gt;
Many search engines and browsers themselves are looking for this icon at the root of the site named Favicon
In your case, the code must be like this (if you specify the relative path):
& lt; link href = "icon / favicon.ico" REL = "Icon" Type = "Image / X- icon "/ & gt; & lt; link href = "icon / favicon.ico" REL = "shortcut icon" type = "image / x-icon" / & gt;
Yes, I use two rows with different REL = “” attributes. So it happened historically because of the browsers and their “bleeding blankets”
And the icon may not be shown if it is incorrectly specified format. For example, to make an icon in FSH and save it as .ico for some reason it does not always work. I make icons in FSH, I save both JPG and then ICOFX converted them to .ico for several years now and everything works fine.
I also had such a problem. In short, you throw the icon in the root of the site (I do not know whether it is necessary or not, but I have it), we prescribe (with such brackets & lt; & gt; I don’t know how to put them LINK REL = “shortcut icon” href = “favicon.ico”
Restart your server. I have no other server there everything is simple with you do not know how