HTTP

HTTP 304 Not Modified vs 499 Client Closed Request

HTTP 304 (Not Modified) is a 3xx Redirection response, while 499 (Client Closed 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, 499 means that a non-standard status code used by Nginx when the client closes the connection before the server responds.

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

A non-standard status code used by Nginx when the client closes the connection before the server responds.

When You See It

In Nginx logs when clients timeout or navigate away before receiving the response.

How to Fix

Optimize server response times. Check for slow upstream services.

Key Differences

1.

304 is a 3xx Redirection response, while 499 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 499: A non-standard status code used by Nginx when the client closes the connection before the server responds.

4.

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

5.

You encounter 499 when in Nginx logs when clients timeout or navigate away before receiving the response.

When to Use Which

For 304 (Not Modified): No fix needed. This saves bandwidth by confirming the cached version is still current. For 499 (Client Closed Request): Optimize server response times. Check for slow upstream services.

Learn More