[SOLVED] favicon.ico net::ERR_EMPTY_RESPONSE error in NetBeans

This post will help you solve the problem of reporting http 404 error regarding lack of favicon.ico when you run HTML5/JavaScript application in NetBeans.

Problem
[quads id=1]There is a bug in NetBeans that occurs even when you run project generated by built-in wizard. You got an error (HTTP 404 not foud) suggesting that favicon.ico file is missing, which is obviously not true. The error is annoying because it makes logs messy and consequently makes it difficult to debug other problems.

GET http://localhost:8383/favicon.ico net::ERR_EMPTY_RESPONSE

 

 

Solution
Move favicon.ico  file into img subdirectory (or different one) and add the following line to html head.
<link rel=”shortcut icon” href=”img/favicon.ico”>
Below is an example:

<!doctype html>
<html lang="pl">
  <head>
    <link rel="shortcut icon" href="img/favicon.ico">
  </head>
  <body>
...
  </body>
</html>

 

 

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu