next.js
09353918 - Switch segment prefetch cache miss response from 204 to 404 (#92751)

Commit
46 days ago
Switch segment prefetch cache miss response from 204 to 404 (#92751) The original reason for using 204 was to prevent segment cache misses from appearing as errors in the browser network panel, e.g. if you prefetch a same-origin link that happens to route to a different app on the same domain. However, in output: export mode, we can't use custom status codes — responses are served as static files, so we're limited to standard HTTP semantics. Using 404 lets the server-driven and static deployment strategies converge on the same client-server protocol. The network panel noise is a minor, non-essential compromise. <!-- NEXT_JS_LLM_PR -->
Author
Parents
Loading