Kurt McKee

lessons learned in production

Archive

Hey there! This article was written in 2019.

It might not have aged well for any number of reasons, so keep that in mind when reading (or clicking outgoing links!).

Handling automatic favicon requests

Posted 17 December 2019 in website

Favicons. I know that they were groundbreaking when they first sprang into existence and use, but I barely remember those days anymore (that was 20 years ago!). But now my server logs are filling up with HTTP 404 errors because I haven't created and placed a favicon.ico file at the root of the site.

To resolve this problem, I created an additional directive in my server configuration. Now, all requests for favicon.ico immediately return HTTP 204 No Content. "Yes, I got your request. No, I have no content for you to display."

I'll eventually add a favicon, but for now I've resolved the 404 errors that are caused by these automatic requests.

☕ Like my work? I accept tips!