HTTP 304 Not Modified vs 421 Misdirected Request
HTTP 304 (Not Modified) is a 3xx Redirection response, while 421 (Misdirected Request) 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, 421 means that the request was directed at a server that is unable to produce a response for the combination of scheme and authority in the URI.
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
The request was directed at a server that is unable to produce a response for the combination of scheme and authority in the URI.
When You See It
With HTTP/2 when a connection is reused for a domain the certificate doesn't cover.
How to Fix
Retry the request on a new connection.
Key Differences
304 is a 3xx Redirection response, while 421 is a 4xx Client Error response.
HTTP 304: The resource has not been modified since the last request. The client can use its cached copy.
HTTP 421: The request was directed at a server that is unable to produce a response for the combination of scheme and authority in the URI.
You encounter 304 when when the browser cache is still valid (If-None-Match / If-Modified-Since headers match).
You encounter 421 when with HTTP/2 when a connection is reused for a domain the certificate doesn't cover.
When to Use Which
For 304 (Not Modified): No fix needed. This saves bandwidth by confirming the cached version is still current. For 421 (Misdirected Request): Retry the request on a new connection.