HTTP Status Code 304 = “Not Modified”
It means the requested resource has not changed since the browser last cached it, so the server tells the browser to use the cached version instead of downloading it again.
Purpose
304 improves performance by:
- reducing bandwidth usage,
- speeding up page loads,
- minimizing server load. Example flow
Browser request
http id=”m8x1qa”
GET /style.css HTTP/1.1
If-Modified-Since: Tue, 19 May 2026 10:00:00 GMT
Server response
http id=”k3p9ld”
HTTP/1.1 304 Not Modified
The browser reuses its cached copy.
Common caching headers
Server sends
http id=”v2w7nf”
Last-Modified: Tue, 19 May 2026 10:00:00 GMT
ETag: “abc123”
Cache-Control: max-age=3600
Browser later sends
http id=”a7j3tw”
If-Modified-Since: Tue, 19 May 2026 10:00:00 GMT
If-None-Match: “abc123”
Is 304 an error?
No.304 is a normal and useful HTTP caching response.
It belongs to the 3xx category, but unlike redirects, it tells the client:
“Use your cached version.”
Developer examples
Node.js Express
js id=”w4c9je”
app.use(express.static(‘public’));
Express automatically handles 304 responses.
PHP
php id=”u2k8xm”
header(“Cache-Control: max-age=3600”);
header(“ETag: abc123”);
When 304 becomes a problem
Sometimes users see stale content because:
- browser cache is outdated,
- CDN cache not refreshed,
- incorrect cache headers,
- aggressive caching policies.
Fixes
- Hard refresh (
Ctrl + F5) - Clear browser cache
- Change asset version: html id=”q8s1rp”
style.css?v=2 Related status codes
| Code | Meaning |
| — | |
| 200 | OK |
| 301 | Moved Permanently |
| 302 | Temporary Redirect |
| 304 | Not Modified |
| 307 | Temporary Redirect |
| 308 | Permanent Redirect |