Bundles, Cache & Preloading Hints
Understand bundles and caching: content hashes, immutable assets, HTML as the switch. Use gentle preloading to make interactions feel instant.
Why bundles + cache matter
Goal: Ship smaller bundles and let the browser cache them safely.
- Content-hashed filenames
- Immutable cache for assets
- HTML stays short-lived
Cache strategy basics
- Hash filenames: app.3f2a1.js
- Cache-Control: max-age=31536000, immutable
- HTML: short TTL (e.g., no-store or minutes)
- Split rarely-used code
All lessons in this course
- React.lazy and Suspense — Lazy Components
- Route-based & Component-level Splitting
- Bundles, Cache & Preloading Hints