HTTP

HTTP 304 Not Modified vs 418 I'm a Teapot

HTTP 304 (Not Modified) is a 3xx Redirection response, while 418 (I'm a Teapot) is a 4xx Client Error response. 304 indicates that the resource has not been modified since the last request. The client can use its cached copy. In contrast, 418 means that any attempt to brew coffee with a teapot should result in this error. An April Fools' joke from 1998 that became a beloved part of HTTP culture.

Description

The resource has not been modified since the last request. The client can use its cached copy.

When You See It

When the browser cache is still valid (If-None-Match / If-Modified-Since headers match).

How to Fix

No fix needed. This saves bandwidth by confirming the cached version is still current.

Description

Any attempt to brew coffee with a teapot should result in this error. An April Fools' joke from 1998 that became a beloved part of HTTP culture.

When You See It

As an Easter egg on some websites, or when a server humorously refuses a request.

How to Fix

Use a coffee pot instead of a teapot. Or just enjoy the joke.

Key Differences

1.

304 is a 3xx Redirection response, while 418 is a 4xx Client Error response.

2.

HTTP 304: The resource has not been modified since the last request. The client can use its cached copy.

3.

HTTP 418: Any attempt to brew coffee with a teapot should result in this error. An April Fools' joke from 1998 that became a beloved part of HTTP culture.

4.

You encounter 304 when when the browser cache is still valid (If-None-Match / If-Modified-Since headers match).

5.

You encounter 418 when as an Easter egg on some websites, or when a server humorously refuses a request.

When to Use Which

For 304 (Not Modified): No fix needed. This saves bandwidth by confirming the cached version is still current. For 418 (I'm a Teapot): Use a coffee pot instead of a teapot. Or just enjoy the joke.

Learn More