HTTP 304 · 3XX RFC 9110 §15.4.5 Cacheable: Yes (revalidates cache) Retryable: No

HTTP 304 Not Modified: Root Causes & Production Fix Guide

HTTP 304 Not Modified saves bandwidth by confirming the client's cached copy matches the server's current ETag or Last-Modified timestamp. Misconfigured ETags across load-balanced servers defeat 304 revalidation.

Top Root Causes of HTTP 304

Nginx Deterministic ETag & Revalidation Config

location / {
    etag on;
    add_header Cache-Control "public, max-age=0, must-revalidate" always;
}

Verify with cURL

curl -i -sS -H 'If-None-Match: "65a1b2-1f4"' https://example.com/index.html

Interactive Stack Diagnoser (HTTP 304)

Frequently Asked Questions

Is HTTP 304 an error?

No. 304 Not Modified is a healthy performance optimization indicating the browser reused its local cached file without re-downloading the body.

Why does my CDN never return 304?

Check that your origin sends an ETag or Last-Modified header and does not send `Cache-Control: no-store`.

Should 304 responses include security headers?

Yes. Include Cache-Control, ETag, Vary, and core security headers with `always` in Nginx so cached metadata stays consistent.

Related Status Guides & Header Tools