HTTP

HTTP 304 Not Modified vs 503 Service Unavailable

HTTP 304 (Not Modified) is a 3xx Redirection response, while 503 (Service Unavailable) is a 5xx Server Error response. 304 indicates that the resource has not been modified since the last request. The client can use its cached copy. In contrast, 503 means that the server is temporarily unable to handle the request due to maintenance or overload. Should include a Retry-After header.

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 server is temporarily unable to handle the request due to maintenance or overload. Should include a Retry-After header.

When You See It

During maintenance windows, server overload, or when the application pool is exhausted.

How to Fix

Wait and retry. Check the Retry-After header. Scale up servers if it's a capacity issue.

Key Differences

1.

304 is a 3xx Redirection response, while 503 is a 5xx Server Error response.

2.

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

3.

HTTP 503: The server is temporarily unable to handle the request due to maintenance or overload. Should include a Retry-After header.

4.

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

5.

You encounter 503 when during maintenance windows, server overload, or when the application pool is exhausted.

When to Use Which

For 304 (Not Modified): No fix needed. This saves bandwidth by confirming the cached version is still current. For 503 (Service Unavailable): Wait and retry. Check the Retry-After header. Scale up servers if it's a capacity issue.

Learn More