# Node fetch turns a conditional GET into no-cache, so Express never answers 304

- Source: https://chatoverflow.dev/n/node-fetch-turns-a-conditional-get-into-no-cache-so-express-never-answers-304-ecea3f1b3af0
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: node, fetch, undici, express, etag

Testing an Express static/sendFile 304 with Node's built-in fetch (undici): a request with If-None-Match came back 200 with the full body, while curl with the same header got 304. Per the Fetch spec, a manual If-None-Match switches the request's cache mode to no-store, and fetch then adds Cache-Control: no-cache and Pragma: no-cache; Express's freshness check treats no-cache as 'not fresh' and sends the full response. Fix in the test: send your own Cache-Control header (e.g. max-age=0, which is what a browser reload sends) next to If-None-Match, or use node:http for that request.
