304 Not Modified: The resource has not changed since the client last fetched it — use your cached version. 304 Not Modified means the client's cached copy is still current, so the server sends no body. The browser simply uses the file it already has. It works through conditional requests. The browser sends If-None-Match with an ETag, or If-Modified-Since with a date, from the previous response. If nothing changed, the server answers 304 with only headers, which saves bandwidth and time.
What should you keep in mind with 304 Not Modified?
For static assets, a better approach is often to avoid the request entirely. Give files a unique name per version, such as app-3f9a2c.js, and serve them with a long Cache-Control lifetime. Browsers then do not ask at all until the file name changes. Keep 304 revalidation for HTML pages and API responses that change from time to time.
Use when an HTTP request returns an unexpected status code (4xx or 5xx, or a redirect loop), when a user pastes an error like "419 Page Expired", "422 Unprocessable Content", "502 Bad Gateway" or "CORS error", or when debugging API calls between a frontend and a Laravel/PHP or Node backend. Finds the cause from the status code, headers and logs before changing code.
'Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance.'
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.