HTTP 304 Not Modified indicates the resource has not changed since the version identified by the conditional headers (If-Modified-Since or If-None-Match). The server returns no body, telling the client to use its cached copy. This is the foundation of HTTP caching validation — it lets the server confirm the client's cache is still fresh without retransmitting the resource, saving bandwidth and improving load times.
Response includes the status code, standard headers (including Content-Type), and a small diagnostic JSON body describing the request and returned status.
Simulator URL (copy in the app after load — not a normal link):
https://httpstatus.com/api/status/304
Example request:
curl -i "https://httpstatus.com/api/status/304"Indicates that the resource has not been modified since the version specified by the request headers (If-None-Match or If-Modified-Since). The client should use its cached copy.
On this code, Inspector focuses on semantics, headers, and correctness warnings that commonly affect clients and caches.
304 Not Modified (RFC 7232 Section 4.1) is triggered by conditional requests: the client sends If-None-Match: "etag-value" or If-Modified-Since: date, and the server checks if the resource changed. If not, it returns 304 with no body. The 304 response MUST include headers that would have been sent with a 200: Cache-Control, Content-Location, Date, ETag, Expires, Vary. This allows the client to update its cached response's metadata. ETag comparison is stronger than Last-Modified (which has 1-second granularity). Weak ETags (W/"tag") allow 304 for semantically equivalent representations.
app.get('/old-path', (req, res) => {
res.redirect(304, '/new-path');
});from fastapi.responses import RedirectResponse
@app.get('/old-path')
async def old_path():
return RedirectResponse('/new-path', status_code=304)@GetMapping("/old-path")
public ResponseEntity<Void> oldPath() {
return ResponseEntity.status(304)
.header("Location", "/new-path")
.build();
}func oldPathHandler(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/new-path", 304)
}