Skip to content

Commit e6f0ebf

Browse files
committed
refactor(ui): Relax static asset cache headers
Index now allows conditional revalidation so returning visitors reuse the cached shell on 304s instead of re-downloading it every load. Static assets cache for thirty days instead of a year, giving a sane recovery window if a mishashed asset ever slips into a release.
1 parent ef622d6 commit e6f0ebf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

nginx.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ server {
1010

1111
location / {
1212
try_files $uri $uri/ /index.html;
13-
add_header Cache-Control "no-cache, no-store, must-revalidate";
13+
add_header Cache-Control "no-cache";
1414
}
1515

1616
location /assets/ {
17-
expires 1y;
18-
add_header Cache-Control "public, immutable";
17+
expires 30d;
18+
add_header Cache-Control "public";
1919
}
2020
}

0 commit comments

Comments
 (0)