I'm getting favicon.ico error

423,591

Solution 1

I have had this error for some time as well. It might be some kind of netbeans bug that has to do with netbeans connector. I can't find any mention of favicon.ico in my code or in the project settings.

I was able to fix it by putting the following line in the head section of my html file

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

I am currently using this in my testing environment, but I would remove it for any production environment.

Solution 2

The accepted answer didn't work for me, I had to add a value to the href attribute:

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

Solution 3

The accepted answer didn't work for me so I've found this solution.

It may be related to the HTML version as the most voted solution there states:

If you need your document to validate against HTML5 use this instead:

<link rel="icon" href="data:;base64,iVBORw0KGgo=">

See the link for more info.

Solution 4

The answers above didn't work for me. I found a very good article for Favicon, explaining:

  • what is a Favicon;
  • why does Favicon.ico show up as a 404 in the log files;
  • why should You use a Favicon;
  • how to make a Favicon using FavIcon from Pics or other Favicon creator;
  • how to get Your Favicon to show.

So I created Favicon using FavIcon from Pics. Put it in folder (named favicon) and add this code in <head> tag:

<link rel="shortcut icon" href="favicon/favicon.ico">
<link rel="icon" type="image/gif" href="favicon/animated_favicon1.gif">

Now there is no error and I see my Favicon:

enter image description here

Solution 5

favicon.ico is the icon of a website on the title bar of your website. Netbeans couldnt find the favicon.ico file in your website folder

if you dont want it, you can remove the line that is similar to this in your head section

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

or if you want to use an icon for the title bar, you can use icon convertor to generate a .ico image and keep it in your website folder and use the above line in the head section

Share:
423,591

Related videos on Youtube

Rockstar5645
Author by

Rockstar5645

Hello.

Updated on July 08, 2022

Comments

  • Rockstar5645
    Rockstar5645 almost 2 years

    I downloaded the Netbeans IDE to code in HTML. I'm new to it. When I run my code, chrome is opening and everything is working just fine. I'm getting some sort of error in the Output - Browser Log.

    Failed to load resource: net::ERR_EMPTY_RESPONSE (20:00:55:963 | error, network)
    at http://localhost:8383/favicon.ico
    

    How do I fix it?

    • Faisal Al-Harbi
      Faisal Al-Harbi over 2 years
      Reading this from seven years in the future... every time I have this problem, the solution is different from the previous time. What I'm getting in FF is no error once, but all subsequent reloads show the error. Solution from element11 solved it (this time).
  • Rockstar5645
    Rockstar5645 about 9 years
    There is no icon like that in my head section.
  • Trinadh venna
    Trinadh venna about 9 years
    Please post your head section html code, it is difficult to solve an error without seeing the code
  • Ricardo Magalhães Cruz
    Ricardo Magalhães Cruz almost 8 years
    I don't think it has to do with NetBeans. It happens whenever you do cordova run browser.
  • Alex Cio
    Alex Cio over 7 years
    For me it happened now while being inside a directory of my website. But it pointed to the root directory looking for a favicon.ico. I am using Chrome...
  • Nirmal
    Nirmal about 7 years
    The accepted answer did not work for me either. Thanks for posting this...it worked me (in chrome).
  • justdan23
    justdan23 over 6 years
    I'm not sure if it is good to use relative paths directly. I typically use @Url.Content("~/Images/favicon.ico") if using MVC or ASP.NET Web API to resolve URLs fully before sending down to the client.
  • Ibo
    Ibo over 6 years
    It has nothing to do with NetBeans, I use Eclipse, PyCharm etc and I get the same error.
  • MSC
    MSC almost 6 years
    Yeah this removes the error in Chrome when hosting my HTML page on AWS S3. Without it I get a 403 error for favicon.ico, despite the fact that there was no reference to a favicon in the code.
  • Kurkula
    Kurkula almost 6 years
    Do we need to specify any mime type for this?
  • Ziggler
    Ziggler almost 6 years
    Tried this... everything works fine in my local but when I deploy to servers I am getting this error..
  • Vlădel
    Vlădel almost 6 years
    This solution might not be correct, as I have tried it, and it doesn't work. Still getting the error.
  • James Toomey
    James Toomey over 5 years
    @Petya Kostova, thanks for the link! Very helpful. Just to add one more link, this article explains how icon is for Chrome/Firefox/etc while shortcut icon is for IE, just for anyone (like me) who was curious why you need both.
  • Harry Theo
    Harry Theo over 4 years
    @Tamas yeap the same for me, the answer below should be the correct one
  • kursus
    kursus over 4 years
    This will trigger the double fetching of the document in some browsers (including Chrome), see stackoverflow.com/questions/2009092/…
  • IvanH
    IvanH over 4 years
    @kursus: The problem seems to be suppressed in Sr Julien answer stackoverflow.com/a/40527353/669527
  • IvanH
    IvanH over 4 years
    This solves the problem without causing double fetching.
  • juan_carlos_yl
    juan_carlos_yl over 4 years
    BE CAREFUL if you're using this option. If you're using a filter in a web project this might cause it to get called twice as I answered here stackoverflow.com/questions/16646819/… . I recommend calling a valid icon it's that simple.
  • bjoster
    bjoster almost 4 years
    An explanation in how this fixes the error would very helpful, consider adding come details about your answer.
  • Sebastian Simon
    Sebastian Simon almost 4 years
    The thing is that /favicon.ico is always requested automatically by browsers or servers, nowadays, if there is no <link rel="shortcut icon">. If you provide a different URI in this <link>, then that URI is requested instead. There is nothing to remove.
  • mokh223
    mokh223 over 3 years
    same here. thanks for posting this. it work for me as well.
  • Nam G VU
    Nam G VU over 3 years
    Agree! This should be th accepeted one.
  • Nam G VU
    Nam G VU over 3 years
    Only with href="#" wokring ref. stackoverflow.com/a/43791570/248616
  • supmethods
    supmethods almost 3 years
    message disappeared when I removed all my chrome extensions
  • alttag
    alttag over 2 years
    Instead of href="#", which can cause some browsers to re-request the page, use <link rel="icon" href="data:,"> to prevent any request, per stackoverflow.com/a/38917888/1327983
  • Timo
    Timo over 2 years
    Here is the link to the solution, not the question.