I'm getting favicon.ico error
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:
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
Related videos on Youtube
Comments
-
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 over 2 yearsReading 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 about 9 yearsThere is no icon like that in my head section.
-
Trinadh venna about 9 yearsPlease post your head section html code, it is difficult to solve an error without seeing the code
-
Ricardo Magalhães Cruz almost 8 yearsI don't think it has to do with NetBeans. It happens whenever you do
cordova run browser
. -
Alex Cio over 7 yearsFor 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 about 7 yearsThe accepted answer did not work for me either. Thanks for posting this...it worked me (in chrome).
-
justdan23 over 6 yearsI'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 over 6 yearsIt has nothing to do with NetBeans, I use Eclipse, PyCharm etc and I get the same error.
-
MSC almost 6 yearsYeah 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 almost 6 yearsDo we need to specify any mime type for this?
-
Ziggler almost 6 yearsTried this... everything works fine in my local but when I deploy to servers I am getting this error..
-
Vlădel almost 6 yearsThis solution might not be correct, as I have tried it, and it doesn't work. Still getting the error.
-
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 whileshortcut icon
is for IE, just for anyone (like me) who was curious why you need both. -
Harry Theo over 4 years@Tamas yeap the same for me, the answer below should be the correct one
-
kursus over 4 yearsThis will trigger the double fetching of the document in some browsers (including Chrome), see stackoverflow.com/questions/2009092/…
-
IvanH over 4 years@kursus: The problem seems to be suppressed in Sr Julien answer stackoverflow.com/a/40527353/669527
-
IvanH over 4 yearsThis solves the problem without causing double fetching.
-
juan_carlos_yl over 4 yearsBE 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 almost 4 yearsAn explanation in how this fixes the error would very helpful, consider adding come details about your answer.
-
Sebastian Simon almost 4 yearsThe 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 over 3 yearssame here. thanks for posting this. it work for me as well.
-
Nam G VU over 3 yearsAgree! This should be th accepeted one.
-
Nam G VU over 3 yearsOnly with
href="#"
wokring ref. stackoverflow.com/a/43791570/248616 -
supmethods almost 3 yearsmessage disappeared when I removed all my chrome extensions
-
alttag over 2 yearsInstead 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 over 2 yearsHere is the link to the solution, not the question.