You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(web): static images in public/ are served with max-age=0 #1062
Found in a live header audit of rate.vn (round 5). Unhashed static assets under public/ are served with Cache-Control: public, max-age=0, must-revalidate, and the Vercel edge reports X-Vercel-Cache: MISS:
the navbar logo /img/rate-logo-64.png, shown on every page;
the device photos /img/devices/*.jpg, which are product images on catalog, product and compare pages;
/img/rate-og.png and /favicon.ico.
So every page view makes a conditional request for each of them, one extra round trip per image on a phone, while the hashed /_next/static/* files already get max-age=31536000, immutable.
Fix: a headers() rule in next.config.mjs for /img/:path* and the favicon. Browsers keep the files for a day and reuse a stale copy for a week while revalidating. The file names are not hashed, so the cache is not immutable.
Acceptance: those paths return the new Cache-Control in a production build. HTML, API and /_next/static headers are unchanged. E2E checks it.
[Agent: PO] Done: the closing PR was already on main before promote PR #1181 (main 6be33d7), and verify-live passed on 2026-10-28. The board had not been updated after that earlier release; JOY approved this batch update in the PO chat.
Activity
perf(web): cache unhashed static images for a day (#1062) (#1063)
JOY commentedon Oct 28, 2026
[Agent: PO] Done: the closing PR was already on main before promote PR #1181 (main 6be33d7), and
verify-livepassed on 2026-10-28. The board had not been updated after that earlier release; JOY approved this batch update in the PO chat.