Qaynaq LABS · TOOLS

HTTP · 3xx Redirection

304 Not Modified

Resource unchanged since last request; use cached version.

When you see this status

  • Client sends If-Modified-Since or If-None-Match header
  • Server validates resource unchanged since specified time/ETag
  • Conditional GET request with no changes detected

Common causes

  • Client caching outdated headers
  • Server misconfigured ETag/Last-Modified
  • Time synchronization issues between client/server

How to debug it

  1. Verify If-Modified-Since/If-None-Match headers match server state
  2. Check server ETag/Last-Modified generation logic
  3. Inspect client cache headers for stale data
  4. Validate server time synchronization

Return this code in your framework

Express (Node.js)
res.status(304).send('')
FastAPI (Python)
from fastapi import Response
return Response(status_code=304)
NestJS
@Get()
getData(@Res() res: Response) { res.status(304).send(''); }
Go (net/http)
w.WriteHeader(http.StatusNotModified)

About HTTP 304

HTTP status code 304 Not Modified is part of the 3xx Redirection family. Resource unchanged since last request; use cached version. Understanding it is essential for backend engineers, API designers, and anyone debugging integrations between services.

The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance: what triggers them, how to debug them in production, and exactly how to return them from common frameworks. Each code page is hand-curated and verified.

Frequently asked

Why does my client keep getting 304 even after updates?

ETag or Last-Modified headers may not update correctly. Ensure server regenerates these on content changes.

Can I include a body with 304 response?

No. RFC 7232 explicitly forbids message body in 304 responses. Use 200 for full responses.

Does 304 consume bandwidth?

No. 304 responses must not include a body, so no bandwidth is used beyond headers.