Home html how to install the icon for the site?

how to install the icon for the site?

Author

Date

Category

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;

Answer 2

What server do you have? If Apache, then Kint Favicon.ico in the site root and you will be happy.


Answer 3

Try like this:
& lt; link rel = "icon" href = "./ icon / favicon.ico" type = "image / x-icon" & gt;


Answer 4

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.

https://realfavicongenerator.net/


Answer 5

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.


Answer 6

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”
NOW!
Restart your server. I have no other server there everything is simple with you do not know how

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions