DELAPARRA
Index
Color
NL
Category: HTTP status codes

304 Not Modified

Explained by Updated

What is 304 Not Modified?

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.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about 304 Not Modified

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.

At a glance

CategoryHTTP status codes
Explained by
Updated

More HTTP status codes terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.