Solid writeup, but worth flagging that NextResponse.redirect on locale detection reintroduces some of the latency you're trying to avoid, the browser still gets a 307 and has to fire a second request before any HTML shows up, edge or not. A rewrite (NextResponse.rewrite) would keep the URL internal on the first hit and skip that round trip entirely, redirect only makes sense if you actually want the localized URL visible for SEO purposes like you mention later. Also curious how you're handling caching here, Accept-Language based routing without a proper Vary header is a classic way to get a French response cached and served to an English visitor on a shared CDN edge.
Solid writeup, but worth flagging that NextResponse.redirect on locale detection reintroduces some of the latency you're trying to avoid, the browser still gets a 307 and has to fire a second request before any HTML shows up, edge or not. A rewrite (NextResponse.rewrite) would keep the URL internal on the first hit and skip that round trip entirely, redirect only makes sense if you actually want the localized URL visible for SEO purposes like you mention later. Also curious how you're handling caching here, Accept-Language based routing without a proper Vary header is a classic way to get a French response cached and served to an English visitor on a shared CDN edge.