HTTP 304 Not Modified
HTTP 304 Not Modified means the client’s cached copy is still valid, so the server sends no body. It is the answer to a conditional request with…
Quick answer
HTTP 304 Not Modified means the client’s cached copy is still valid, so the server sends no body. It is the answer to a conditional request with If-None-Match (ETag) or If-Modified-Since, and it saves bandwidth for both browsers and crawlers.
Last updated · Maintained by FreeAIToolz · How we test
What does HTTP 304 Not Modified mean?
The client keeps using its cached version and refreshes its metadata from the 304 headers. 304 is a sign caching works. Googlebot supports conditional requests and uses ETag and Last-Modified to avoid re-downloading unchanged pages.
| Status code | 304 |
|---|---|
| Name | Not Modified |
| Class | 3xx Redirection |
| Defined in | RFC 9110 §15.4.5 |
| Cacheable by default | No, unless Cache-Control says so |
| Safe to retry automatically? | Not applicable |
| Related headers | ETag, Last-Modified, If-None-Match (request), If-Modified-Since (request) |
What causes HTTP 304?
- The client sent If-None-Match or If-Modified-Since and the resource did not change.
How do I fix HTTP 304?
- Send accurate ETag or Last-Modified headers so clients and crawlers can revalidate.
- Make sure ETags change whenever content changes, or users will see stale pages.
What should a client do after HTTP 304?
Use the cached copy.
Does HTTP 304 affect SEO?
Helps crawl efficiency: Google says it uses ETag and Last-Modified for caching. It does not hurt indexing as long as the cached content is current.
Example 304 response
HTTP/1.1 304 Not Modified
Date: Mon, 01 Dec 2026 12:00:00 GMT
ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"
Cache-Control: max-age=3600 How to return 304 Not Modified in code
Express (Node.js)
res.status(304).json({ error: 'Not Modified' }); Next.js route handler
return new Response(null, { status: 304 }); FastAPI (Python)
return Response(status_code=304) PHP
http_response_code(304); Nginx
location = /example {
return 304;
} Other 3xx status codes
Further action is needed, usually following the Location header to another URL.
Frequently asked questions
Is 304 an error?
Why do users see old content after a deploy?
Is 304 a client or server error?
Related
- 200 OK HTTP 200 OK means the request succeeded.
- 206 Partial Content HTTP 206 Partial Content means the server is returning only part of the resource because the client asked for .
- 412 Precondition Failed HTTP 412 Precondition Failed means a condition the client set in a request header, such as If-Match or If-Unmo.
- 103 Early Hints HTTP 103 Early Hints is an interim response that lets a server send Link headers (preload or preconnect) befor.
- Open the HTTP Status Codes Reference → Free, no signup.