Why I see error 404 (not found), failed to load favicon.ico when you are not using this?

abstract

After creating a simple HTML template for testing purposes without the favicon.ico file, the error message "The resource could not be loaded: the server responded with the status 404 (not found)" appears in the console | " http : //127.0.0.1-00-007021/favicon.ico ".

I'm trying to figure out where this error comes from, and I thought if anyone had any ideas to point me in the right direction.

My HTML page looks like this:

<!doctype html> <html> <head> <meta charset="UTF-8"> <title>Simple JavaScript Tester 01</title> </head> <body> <script src="script.js"></script> </body> </html> 

When I launch this page in the Chrome browser and open the console, I see the error message "Failed to load the resource: the server responded with the status 404 (not found)" | " http : //127.0.0.1-00-007021/favicon.ico ". I am running this on a local IIS server. I see this error message every time I create a new page.

Is it possible that this error comes from another page on my IIS server that I don't know about?

+9
source share
4 answers

Google favicon generator and make icon. Name it favicon.ico and put it on your website.

See if that helps.

There is also a favicon tutorial here: https://www.w3.org/2005/10/howto-favicon

+3
source

By adding this to the header section, you are sure to fix the problem in the console log

 <link rel="shortcut icon" href=""> 
+13
source

Because your browser is always looking for favicon.ico, even if you don't specify it in your HTML.

Therefore, I would suggest just creating it and putting it in the root of your site.

+9
source
  <link rel="shortcut icon" href="~/favicon.ico"> 

You cannot stop browsers requesting an image. However, if you have an icon, it can be cached by the browser, which can reduce the number of incoming requests. Therefore, if you have an icon in the root folder of the application, the link above should work

-1
source

All Articles