9

When I run my project in browser I get the "can not find favicon.ico" error in browser console:

Failed to load resource: the server responded with a status of 404 (Not Found)
:8080/favicon.ico

enter image description here

But when I search for favicon in whole project in WebStorm it finds nothing:

enter image description here

LazyOne
  • 158,824
  • 45
  • 388
  • 391
sof-03
  • 2,255
  • 4
  • 15
  • 33

2 Answers2

15

This is normal. No matter if you declared it or not in your code, Chrome will try will try to fetch favicon.ico at the root of your site to display it in your tab. In your case it will try to fetch: http://localhost:8080/favicon.ico

All browsers will do this except SeaMonkey according to Wikipedia article on Favicon

In the old days, this was the standard way of personalizing the browser icon. Now there is a ton of possible icons you can set for various devices: https://stackoverflow.com/a/26768184/1375487

Also, you can check this answer as it suggests ways to prevent that auto-fetch: https://webmasters.stackexchange.com/a/34572

In any case, the best practice would be to set a favicon.ico for your project.

tlebel
  • 309
  • 1
  • 10
6

favicon.ico is the icon on the title bar in your website.

Browser did not find it in your website.

You should provide it to your index.html:

<link rel="shortcut icon" href="assets/images/favicon.ico">

The path you can change by your case.

aircraft
  • 25,146
  • 28
  • 91
  • 166