SiteError.comYour friendly guide to HTTP status codes
Status CodesBlog
  1. Home
  2. 3xx Redirection
  3. 304 Not Modified

304 Not Modified

💾
304
Not Modified
→

Example HTTP Response

HTTP Response
HTTP/1.1 304 Not Modified
ETag: "abc123"
Common Causes
  • Browser cache is still valid
  • Resource hasn't changed since If-Modified-Since
  • ETag matches, no download needed
Technical Details

What does this mean?

Same old, same old! Nothing has changed since you last checked. Use your cached copy!

Technical Definition

Indicates that the resource has not been modified since the version specified in the request headers.

RFC Says

"The 304 (Not Modified) status code indicates that a conditional GET or HEAD request has been received and would have resulted in a 200 (OK) response if it were not for the fact that the condition evaluated to false."

Plain English:

The resource hasn't changed since your last request, so use your cached version. This is used with conditional requests (If-Modified-Since or If-None-Match headers) to save bandwidth. The response should not contain a message body.

Common Misinterpretation

304 is not an error - it's a successful response indicating the cache is still valid. Always return appropriate cache headers (ETag or Last-Modified) with the 304 so the client can validate the cache again in the future.

View RFC Documentation
Code Snippets

Ready-to-use code for returning this HTTP status in your application:

Node.js
// Express.js
app.get('/example', (req, res) => {
  res.status(304).json({
    error: 'Not Modified',
    message: 'Your error message here'
  });
});

// Native HTTP
const http = require('http');

http.createServer((req, res) => {
  res.writeHead(304, { 'Content-Type': 'application/json' });
  res.end(JSON.stringify({
    error: 'Not Modified',
    message: 'Your error message here'
  }));
}).listen(3000);
SEO Handling

Indexing

304 responses don't affect indexing directly. The previously cached content remains indexed. This is purely a caching optimization.

Crawler Behavior

Crawlers use 304 to reduce bandwidth and crawl more efficiently. It tells them the cached version is still valid.

Canonical URL Notes

No canonical implications. The URL's indexing status is determined by the original 200 response, not the 304.

Google Notes

Proper use of 304 with ETags/Last-Modified improves crawl efficiency, letting Googlebot crawl more of your site in its budget.

Google Search Documentation →

304 Not Modified FAQ

What causes a 304 Not Modified error?

Browser cache is still valid. Resource hasn't changed since If-Modified-Since. ETag matches, no download needed.

303 See Other305 Use Proxy

Popular Status Codes

  • 200 OK
  • 301 Moved Permanently
  • 302 Found
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable

Compare Codes

  • 401 vs 403
  • 301 vs 302
  • 404 vs 410
  • 500 vs 502
  • Compare any codes →

Categories

  • Informational
  • Success
  • Redirection
  • Client Error
  • Server Error
  • NGINX
  • Cloudflare
  • AWS ELB
  • Microsoft IIS

Tools

  • Cheat Sheet
  • Status Code Quiz
  • URL Checker
  • API Playground
  • Blog

© 2026 SiteError.com. All rights reserved.