javascriptserverxampplocalhostlocalserver

Running a local server for javascript but still not able to load favicon images


I'm running a local server but my console says that it still can't load the images from my system. My images are inside a folder and I'm trying to load it. I have tried using several servers - xampp, npm node.js, vscode live server, servez and even though my servers are running it does not display the image.

These are the errors,

Not allowed to load local resource:

and

"GET /favicon.ico" Error (404): "Not found"

I've been having this issue for a while. I'm trying to work with JavaScript and p5 so I require images from my system. How do I get rid of these errors and be able to load images from my system folder. Thank you, any help is appreciated


Solution

  • The error states that in the root project favicon.ico file doesn't exist, so grab a copy of favicon.ico and put it in your root project directory.