Reputation: 3
I can't solve my server problem; could you help on this?
HTML:
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<img src="" id="rainbow">
JavaScript:
<script>
console.log('im trying to fetch a c# logo')
fetch('download.png').then(response => {
console.log(response)
})
</script>
Error message:
im trying to fetch a c# logo
fetch.html:44 Live reload enabled.
download.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
Upvotes: 0
Views: 21367
Reputation: 317
The 404 error
belongs to the 4xx error
category and indicates an error on the client's side.
A 404 error occurs when a file cannot be found.
How can you fix this?
Upvotes: 3