Logo
DevUtilsAll-in-one toolkit
Back to all codes
3043xx
3xx — Redirection

Not Modified

Tells the client that the cached version of the requested resource is still fresh and can be used.

What it means

The HTTP 304 Not Modified client redirection response code indicates that there is no need to retransmit the requested resources. It is an implicit redirection to a cached resource.

This happens when the request method is safe (like GET or HEAD), and the client sent conditional request headers (like `If-None-Match` or `If-Modified-Since`) that the server validated against the current version of the resource.

How it works

  • 1The client makes a GET request, including a header like 'If-None-Match: "hash123"'.
  • 2The server checks the current ETag of the resource.
  • 3If the current ETag is still "hash123", the server responds with '304 Not Modified' and an empty body.
  • 4The client uses its local cached copy, saving bandwidth and load time.

Why you're seeing this

  • The client has the latest version of the file.

How to fix it

  • If you updated a file but users are getting 304s and seeing the old version, you need to implement 'cache busting' (e.g., changing the filename to style.v2.css) so the browser requests a new URI.

Framework Implementations

Express.js

// Express handles ETags and 304s automatically for res.send() and res.sendFile().

Real-Life Scenarios

Use this extensively for static assets (images, CSS, JS) and heavily read-heavy APIs to massively reduce server bandwidth and improve client performance.

Browser Image Caching

A user visits your site again. The browser asks the server if 'logo.png' has changed since yesterday. The server says 'No' (304), and the browser instantly renders the logo from disk.

HTTP Transaction

1. Client Request

GET /style.css HTTP/1.1
Host: site.com
If-Modified-Since: Wed, 21 Oct 2015 07:28:00 GMT

2. Server Response

HTTP/1.1 304 Not Modified
Date: Thu, 22 Oct 2015 18:00:00 GMT

SEO Implications

Excellent for SEO. It reduces crawl budget waste, allowing Googlebot to crawl more pages on your site rather than redownloading unchanged resources.

Related Codes