HomeChallengesRepsProblemsLeaderboardTake a challenge

Cache Headers and a Budget

Serve the build correctly — cache the hashed assets forever, never cache index.html — and add the CI check that stops the bundle growing quietly.

Advanced25 min on the clock5 graded checks · 100 pointsDocker + Deploy SprintPro
Graded by reading your code against the checklist below.

What you build

  • Compress text responses
  • Cache hashed assets for a year, immutably
  • Make index.html uncacheable
  • Serve the SPA fallback for unknown paths
  • Fail the pull request when the gzipped bundle passes its budget

Done means

A repeat visit refetches nothing but index.html, and a bundle 40KB over budget turns the pull request red.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. Compress text responses+15Running it in production
  2. Cache hashed assets immutably+20Running it in production
  3. Never cache index.html+25Running it in production
  4. Serve the SPA fallback+15Running it in production
  5. Fail the build when the bundle passes budget+25Continuous delivery

What it teaches

The rest of Docker + Deploy Sprint