Make browsers check for a new web map on every load
main.bundle.js and the CSS keep the same name in every version, and nginx didn't send Cache-Control, so browsers could keep running the old bundle after a deploy. Then new pages (like /research/tree) showed the landing page, stuck on "Loading servers…". Send Cache-Control: no-cache, so browsers revalidate each load; unchanged files are still a cheap 304 via the ETag. Icons keep their 1 day expiry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a0519a1b83
commit
9bdb6a5812
1 changed files with 4 additions and 0 deletions
|
|
@ -42,6 +42,10 @@ http {
|
|||
try_files $uri $uri/ $uri.html /index.html;
|
||||
|
||||
include mime.types;
|
||||
|
||||
# main.bundle.js and the CSS keep the same name in every version, so make browsers check
|
||||
# for a new version on every load (unchanged files get a cheap 304, via the ETag)
|
||||
add_header Cache-Control "no-cache" always;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue