Skip to content
Log In Sign Up info@muvcloud.com

What 304 Not Modified Means

When a browser has a file in its cache but is not sure the file is still current, it asks the server with a conditional request: "send it only if it changed". If nothing changed, the server answers 304 with headers only. The browser then uses its cached copy. A page full of images, scripts, and stylesheets loads faster this way, and the server sends far less data.

Seeing many 304 lines in your access log is normal and healthy.

How a Conditional Request Works

The first response for a file carries one or two validators:

HTTP/1.1 200 OK
ETag: "65a1f3-1c2b"
Last-Modified: Mon, 23 Nov 2026 10:00:00 GMT

On the next visit the browser sends them back:

If-None-Match: "65a1f3-1c2b"
If-Modified-Since: Mon, 23 Nov 2026 10:00:00 GMT
ValidatorRequest header
ETagIf-None-Match
Last-ModifiedIf-Modified-Since

The ETag is a fingerprint of the file's version and takes priority when both are present. If it still matches, the answer is 304; if not, the server sends the new file with 200.

See a 304 with curl

First fetch the validator:

curl -I https://example.com/css/style.css

Then send it back, using the ETag from your own output:

curl -I -H 'If-None-Match: "65a1f3-1c2b"' https://example.com/css/style.css

The second answer should be 304. If it is 200 every time, the server is not using validators for that file, or something in between changes them.

When 304 Leads to Stale Content

A 304 itself only confirms what the server believes. Old content usually has one of these causes:

  • Cache-Control lifetime: with a long max-age, the browser does not ask at all until the time runs out, so even a changed file is not fetched. Give changed files new names, such as style.v2.css or a hashed name from your build tool.
  • Validators that do not change: an application that sends a fixed Last-Modified or ETag for content that does change. Generate them from the content or its real change time.
  • A CDN cache: the CDN serves its own copy; purge it after a deploy. See what is a CDN.

Several Servers Behind a Load Balancer

If each server builds ETags from details that differ between machines, such as a file's modification time after separate deploys, the same file gets a different ETag on each one. Browsers then receive 200 instead of 304 whenever they reach another server. Nothing breaks, but transfer rises. Deploy files with the same timestamps everywhere, or base caching on Cache-Control and versioned names.

Server Settings

Nginx sends ETag and Last-Modified for static files by default; etag off; turns ETags off. Apache controls what its ETag is built from with the FileETag directive. Dynamic pages from PHP or another application get validators only if the application sends them.

Forcing a Full Reload

To skip the cache in a browser, use its hard reload or open the developer tools and tick the option that disables the cache while they are open. A private window also starts with an empty cache. With curl, leave out the conditional headers and every request is a full one.

The rest of the codes are in HTTP status codes explained, and a related browser message is covered in ERR_CACHE_MISS.

Updated:

Linux VPS with Full Root Access

MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.

Cloud VPS Plans Starting at2.99 $/mo Cheap Linux VPS

No Limits on Service or Support

You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

Support specialist
  • 100% customer satisfaction goal
  • Our own hardware
  • 24/7 ticket and email support
  • 4 countries with locations