fix: never cache HTML shell (no more stale bundles); tidy trick offsets
- nginx: serve the HTML shell with Cache-Control no-store so a new deploy (new chunk hashes) is picked up immediately — fixes the recurring stale-bundle "page couldn't load" at the source. Hashed /_next/static stays immutable. - Trick offsets set to a clean symmetric cross. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+8
-1
@@ -10,7 +10,14 @@ server {
|
||||
try_files $uri $uri.html $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Long-cache immutable build assets.
|
||||
# Never cache the HTML shell — so a new deploy (with new chunk hashes) is
|
||||
# always picked up immediately and tabs don't load a stale bundle.
|
||||
location ~* \.html$ {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
# Long-cache immutable, content-hashed build assets.
|
||||
location /_next/static/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
|
||||
Reference in New Issue
Block a user