相关文章推荐
喝醉的米饭  ·  .Net 6 ...·  1 年前    · 
卖萌的青椒  ·  2018-04-19 - G风 - 简书·  1 年前    · 
有爱心的花卷  ·  Spring Boot ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I downloaded the Netbeans IDE to code in HTML. 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?

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). – DarenW Feb 14, 2022 at 23:17 In my case, it was fixed by moving the favicon.ico to the same place as my Html file. Obviously, you should change the icon path too. – Asef Hossini Aug 2, 2022 at 19:23

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.

I don't think it has to do with NetBeans. It happens whenever you do cordova run browser. – Ricardo Magalhães Cruz Jul 21, 2016 at 10:43 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... – Alex Cio Feb 24, 2017 at 2:13 This solution might not be correct, as I have tried it, and it doesn't work. Still getting the error. – Vladel Sep 11, 2018 at 12:50 The accepted answer did not work for me either. Thanks for posting this...it worked me (in chrome). – Nirmal Jun 19, 2017 at 21:04 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. – MSC Jul 19, 2018 at 23:27 This will trigger the double fetching of the document in some browsers (including Chrome), see stackoverflow.com/questions/2009092/… – kursus Feb 18, 2020 at 16:23 @kursus: The problem seems to be suppressed in Sr Julien answer stackoverflow.com/a/40527353/669527 – IvanH Mar 4, 2020 at 11:35

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=">

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:

    Tried this... everything works fine in my local but when I deploy to servers I am getting this error.. – Ziggler Aug 8, 2018 at 16:55 @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. – James Toomey Feb 1, 2019 at 20:37

    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

    Please post your head section html code, it is difficult to solve an error without seeing the code – Trinadh venna Jun 26, 2015 at 14:47 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. – Sebastian Simon Sep 4, 2020 at 19:19

    My index page was in a temporary sub-folder named LAYOUTS. To reach the favicon.png from inside the IMAGES folder, which was a sibling of the LAYOUTS folder, I had to put a path in my href like this

    href="../images/favicon-32x32.png"
    

    Double periods are necessary for folder navigation "upwards", then the forward slash + images string gets you into the images folder (performing a tree branch "jump") and finally you get to reference your file by writing favicon-32x32.png.

    This explanation is useful for those that start out from scratch and it would have been useful to have seen it a couple of times since I would forget that I had certain *.php files outside the LAYOUTS folder which needed different tree hrefs on my links, from the HEAD section of each page.

    Reference the path to your favicon image accordingly.

    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. – justdan23 Sep 28, 2017 at 13:57

    This problem occurs when you do not declare at the top of your HTML file in HEDER this tag.

    <link rel="icon" href="your_address_icon" type="image/x-icon">
    

    It's a nightmare since each browser/device handles it differently.

    Favicon generator helps me a lot for those applications where we need to cover the most possible scenarios.

    https://realfavicongenerator.net/

    You just need a png image 260px x 260px (at least) and from there the generator will create all references you need within your web page.

    You just need to add this references and images to your application.

    Server Configuration Nginx

    If you are deploying your application to a server that is running Nginx, you may use the following configuration file as a starting point for configuring your web server. Most likely, this file will need to be customized depending on your server's configuration. If you would like assistance in managing your server, consider using a first-party Laravel server management and deployment service.

    server {
        listen 80;
        listen [::]:80;
        server_name example.com;
        root /srv/example.com/public;
        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-Content-Type-Options "nosniff";
        index index.php;
        charset utf-8;
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }
        error_page 404 /index.php;
        location ~ \.php$ {
            fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
            include fastcgi_params;
        location ~ /\.(?!well-known).* {
            deny all;
    

    edit these line into site-avalible in your files.

     location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }
    

    Optimization - Autoloader Optimization

    When deploying to production, make sure that you are optimizing Composer's class autoloader map so Composer can quickly find the proper file to load for a given class:

    composer install --optimize-autoloader --no-dev

    thankyou! @syedasadrazadevops

    I had a weird situation. Mine was working fine and all of sudden stopped with that error message. I already had the header declaration. So I was dumb founded as to why it wasn't working.

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

    Literally nothing else on the site had an issue that I could tell. The only thing that fixed it for me was to restart my Apache service and all was good again.

    if nothing else is working, give that a shot and see what happens.

    I was getting the same fav icon error - 404 (Not Found). I used the following element in the <head> element of my index.html file and it fixed the error:

    <link rel="icon" href="data:;base64,iVBORw0KGgo=">
                    An explanation in how this fixes the error would very helpful, consider  adding come details about your answer.
    – bjoster
                    Jul 14, 2020 at 10:09
    

    Try this add "icon" with your stylesheet Maybe it solve your error "favicon.ico:1 not found " First Try to understand about favicon.enter image description here SET your favicon icon file in your folder. You can generate your favicon using "https://favicon.io/favicon-generator/".

    i was getting the same problem (using thymeleaf) i solved by downloading the bootstrap link that i'm using on my html to my spring-boot-project just hover your mouse over the link and your IDE (ps :intellij is the best) will propose to you to downloaded & and bom problem solved