Interview practice question
Static assets cached forever
System Design · Caching · Beginner
You want browsers and the CDN to cache your JavaScript files for a year, but still deliver updates instantly when you deploy. How?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Fingerprinted file names (hash in name).
- Cache-Control: max-age=1 year, immutable.
- HTML references new file names on deploy.
- HTML itself short cache.
- No purge needed.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.