HTTP

HTTP 200 OK vs 304 Not Modified

HTTP 200 (OK) is a 2xx Success response, while 304 (Not Modified) is a 3xx Redirection response. 200 indicates that the request succeeded. The meaning depends on the HTTP method: GET returns the resource, POST reports the action result, HEAD returns headers only. In contrast, 304 means that the resource has not been modified since the last request. The client can use its cached copy.

Descrição

The request succeeded. The meaning depends on the HTTP method: GET returns the resource, POST reports the action result, HEAD returns headers only.

Quando você o vê

The most common HTTP response — indicates the request was processed successfully.

Como corrigir

No fix needed. The request succeeded as expected.

Descrição

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

Quando você o vê

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

Como corrigir

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

Diferenças principais

1.

200 is a 2xx Success response, while 304 is a 3xx Redirection response.

2.

HTTP 200: The request succeeded. The meaning depends on the HTTP method: GET returns the resource, POST reports the action result, HEAD returns headers only.

3.

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

4.

You encounter 200 when the most common HTTP response — indicates the request was processed successfully.

5.

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

Quando usar qual

For 200 (OK): No fix needed. The request succeeded as expected. For 304 (Not Modified): No fix needed. This saves bandwidth by confirming the cached version is still current.

Saiba mais