Web Vitals & Performance (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)
Enterprise Cache-Control Header Strategies.
senior LevelMost AskedSystem Design
In Simple Words:
- Static Hashed Assets (
/static/app.a8f9c1.js):Cache-Control: public, max-age=31536000, immutableCached in browser for 1 year. The file hash changes on every code update, guaranteeing instant updates. - Dynamic HTML Pages (
/or/sections):Cache-Control: public, max-age=0, s-maxage=3600, stale-while-revalidate=86400CDN serves cached HTML immediately while revalidating in background.