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.
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.
location / {
etag on;
add_header Cache-Control "public, max-age=0, must-revalidate" always;
}
curl -i -sS -H 'If-None-Match: "65a1b2-1f4"' https://example.com/index.html
No. 304 Not Modified is a healthy performance optimization indicating the browser reused its local cached file without re-downloading the body.
Check that your origin sends an ETag or Last-Modified header and does not send `Cache-Control: no-store`.
Yes. Include Cache-Control, ETag, Vary, and core security headers with `always` in Nginx so cached metadata stays consistent.