304 Not Modified, Blank page rendering
Unanswered
Japanese littleneck posted this in #help-forum
Japanese littleneckOP
Any time I get 304 Not-Modified with a header x-nextjs-cache: HIT, Next.js is rendering a blank page. Sometimes I can get it to render if I've already been to the page and I navigate to it from a working page.
Any other user (incognito window, curl, etc...) gets a 304 and an empty response body.
https://staging.civicmedia.us/
Someone else told me this can happen if I fetch data in a layout, which I do a lot of, but it doesn't make sense to me why this would happen in that case and my layouts do actually rely on dynamic data.
I have tried 13.4.12, 13.4.17, 13.5.4, and 13.5.5-canary.
1. Am I experiencing a buggy App router?
2. Am I misusing layouts?
Any other user (incognito window, curl, etc...) gets a 304 and an empty response body.
https://staging.civicmedia.us/
$ curl -I https://staging.civicmedia.us/
HTTP/2 304
vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url, Accept-Encoding
x-nextjs-cache: HIT
x-powered-by: Next.js
cache-control: s-maxage=60, stale-while-revalidate
etag: "6edpgt262n19tw"
content-type: text/html; charset=utf-8
x-cloud-trace-context: 732874189d92a71a39d9b527bce31504;o=1
content-length: 59514
date: Mon, 09 Oct 2023 20:19:32 GMT
server: Google Frontend
via: 1.1 google, 1.1 google
cdn_cache_status: miss
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000Someone else told me this can happen if I fetch data in a layout, which I do a lot of, but it doesn't make sense to me why this would happen in that case and my layouts do actually rely on dynamic data.
I have tried 13.4.12, 13.4.17, 13.5.4, and 13.5.5-canary.
1. Am I experiencing a buggy App router?
2. Am I misusing layouts?
8 Replies
West African Lion
Hey @Japanese littleneck, did you fix this problem? I'm hitting it too
West African Lion
Duplicates #304 Not Modified #im getting a 304 not modified status in prod, but 200 in localhost
Japanese littleneckOP
Nope, still dealing with it. Downgraded to <= 13.4.19 for now.
West African Lion
And 13.4.19 works?
Sad to hear mate
Made my own issue here: #304 Not Modified (with repro)
West African Lion
GitHub issue here: https://github.com/vercel/next.js/issues/56018
Cape lion
looks that they fixed it on 14.0.2. Can you test it please?