Troubleshooting guide
304 Not Modified: what it means
A 304 is a good thing: the browser asked "has this changed?" and the server said "no, use your copy". Problems start only when content changed and the server still answers 304.
3 min read10 sectionsUpdated
On this page
Fixes if it is your site
Make validators change with content: hash-based ETags or file names with content hashes for static assets (app.3f9a1c.js) and long Cache-Control: max-age. Purge the CDN after deploys if it caches HTML.
curl -sI https://example.com/app.js | grep -iE "etag|last-modified|cache-control"
curl -sI https://example.com/app.js -H 'If-None-Match: "abc123"' | head -1Reading the status code like an engineer
An HTTP status code means the connection worked and a server answered, so the network is fine and the question is which server answered and why. Look at the response headers: Server, Via and CDN-specific headers (cf-ray, x-cache) show whether a CDN, a proxy or your application produced it, and the body format usually confirms it. Then reproduce the exact request with curl, including method, headers and body, and compare it with a request that works. Monitoring should alert on unexpected codes for important URLs, and on rates of 4xx and 5xx rising after a deploy, rather than on every single error.
How site owners catch this before visitors do
Most visitors who hit 304 Not Modified leave without telling you. An uptime check every minute, with a keyword assertion on the page and an SSL check on every run, turns this from a support ticket into an alert. Keep the history: errors that come and go (one region, one server behind a load balancer, one in twenty requests) only make sense on a timeline. Put the result on a status page so people stop guessing. You can test any address now with the free website down checker.
Is 304 an error?
No, it means the cached copy is still valid.
Why do users see old content?
Validators did not change when the content did, or a cache served an old copy.
Should uptime checks accept 304?
Checks normally do not send validators, so they get 200; treat 304 as success if they do.
Related reading
- 400 Bad Request: what it means and how to fix it: Fix a 400 Bad Request error: oversized cookies, malformed URLs, invalid JSON bodies and proxy rules, with commands to find which layer rejected it.
- 501 Not Implemented: how to fix it: Fix 501 Not Implemented: unsupported HTTP methods, servers and proxies that do not support PATCH or WebDAV, and how it differs from 405 and 500.
- Apache HTTP Server monitoring: Monitor Apache HTTP Server: mod_status workers and scoreboard, requests per second, busy vs idle workers, MaxRequestWorkers limits, error logs.
- 410 Gone: what it means and when to use it: 410 Gone explained: how it differs from 404, how search engines treat it, when to remove pages with 410, and how to fix a 410 you did not expect.
- 499 Client Closed Request in Nginx: what it means: What Nginx 499 Client Closed Request means: impatient clients, load balancer timeouts and slow backends, and how to tell a harmless 499 from a real outage.
- 403 Forbidden: what it means and how to fix it: Fix 403 Forbidden errors: file permissions, missing index files, WAF and bot rules, IP allowlists, expired signed URLs and missing API scopes, step by step.
Watch your own site and services with VitalRix
Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.