A found document
GET / can return 200 with Content-Type: text/html. The browser then requests the linked stylesheet, image and icon through independent requests. Those resources need their own correct statuses and types.
Each example is illustrative; it describes protocol behaviour rather than an API exposed by this site.
GET / can return 200 with Content-Type: text/html. The browser then requests the linked stylesheet, image and icon through independent requests. Those resources need their own correct statuses and types.
For GET /nonexistent/, the server may send a helpful 404 HTML document while preserving the 404 status. A redirect to the homepage is usually less informative than a proper missing-resource response.
A redirect conveys the replacement URL with Location. It is useful when a real resource has moved. It should not be invented simply to route every unknown URL back to the homepage.
After downloading CSS, a browser may revalidate it with If-None-Match or If-Modified-Since. The server can return 304 if the representation is unchanged. This is normal cache behaviour, not an error.