Course contentsShow
← Web Development
Lesson 2208 of 2,98240. Browser DevTools Deep DiveFree lesson

Identifying 304 Not Modified Responses

Understand how conditional requests work and when resources are revalidated versus served from cache.

Identifying 304 Not Modified Responses

You'll learn how to spot when browsers successfully reuse cached resources instead of downloading them again.

What Is a 304 Response?

A 304 Not Modified response is the browser's way of saying "I already have this file, and it hasn't changed." When you see this status code in the Network panel, it means the server validated that your cached version is still current, so no file content was transmitted—saving bandwidth and time.

How Conditional Requests Work

Here's the process:

  1. First visit: Browser downloads a resource and stores an ETag or Last-Modified timestamp
  2. Subsequent visit: Browser sends a conditional request with If-None-Match (ETag) or If-Modified-Since headers
  3. Server validates: Checks if the resource changed
  4. Result: Either 200 OK with new content, or 304 Not Modified with no body

Think of it like asking a librarian: "Has this book been updated since I checked it out last Tuesday?" Instead of handing you the entire book again, they just say "Nope, yours is current"—saving everyone time.

Spotting 304s in DevTools

In the Network panel, look for:

  • Status code: 304 (sometimes shown with gray or lighter styling)
  • Size column: Shows "disk cache" or similar instead of actual bytes
  • Time column: Very fast (typically <10ms) since no content transferred
  • Headers tab: Contains validation headers like If-None-Match

A healthy web application will show many 304 responses on repeat visits, indicating efficient cache revalidation rather than wasteful re-downloads.

Key Takeaway: A 304 Not Modified response confirms your cached resource is still valid, eliminating the need to transfer content while maintaining freshness through server validation—the best of both worlds for performance.