Why am I seeing a 404 (Not Found) error failed to load favicon.ico when not using this?

Synopsis

After creating a simple HTML template for testing purpose, with no favicon.ico, I receive an error in the console "Failed to load resource: the server responded with a status of 404 (Not Found)" | "http://127.0.0.1:47021/favicon.ico".

I am trying to figure out where this error is coming from and wondered if someone 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 run this page in Chrome browser and open the console, I see the error message "Failed to load resource: the server responded with a status of 404 (Not Found)" | "http://127.0.0.1:47021/favicon.ico". I am running this on a local IIS server. I see this same error message each time I create a new page.

Is it possible this error is coming from another page on my IIS server that I am unaware of?


Solution 1:

By adding this to the header section, you will definitely remove the error in the console log:

<link rel="shortcut icon" href="">

From Chrome 2020 this is the solution :

<link rel="shortcut icon" href="#">

Solution 2:

Because your browser always looks for the favicon.ico even if you don't specify it within your HTML.

So I'd suggest just creating one and placing it in the root of your website.

Solution 3:

Google favicon generator and make an icon. Name it favicon.ico and drop it in your webroot.

See if this helps.

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

Solution 4:

You can add this to your <head> tag

<link rel="shortcut icon" href="#">

Works for me