open atlas
↑ Back to track
Frontend Architecture FE · 06 · 08

Code splitting: free-recall review

Free-recall prompts across the code-splitting unit. Answer each in your own words first, then reveal the model answer and compare.

FE Senior ◷ 13 min
Level
FoundationsJuniorMiddleSenior

Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of recall is what makes the splitting decision tree stick.

Goal

Reconstruct the unit’s spine — why splitting is a latency trade, the route-vs-component rule, the request waterfall, the vendor-chunk cache trap, and the preload/prefetch split — without looking back at the overview.

Recall before you leave
  1. 01
    Why is code splitting a latency trade rather than a free size cut?
  2. 02
    Why is route-based splitting the safe default while component-level splitting is a scalpel?
  3. 03
    Explain the request waterfall and why HTTP/2 multiplexing does not save you from it.
  4. 04
    How does isolating a vendor chunk help caching, and how does it accidentally backfire on every deploy?
  5. 05
    When do you use rel=preload (modulepreload) versus rel=prefetch for a chunk?
  6. 06
    Why is lazy-loading an above-the-fold component a classic production accident, and which Core Web Vitals does it attack?
Recap

If you could reconstruct each answer from memory, you hold the unit’s spine: splitting trades one download for many requests, so the metric is sequential round trips added, not bytes saved. Route-based splitting is the bounded, high-leverage default; component-level is a scalpel for heavy, off-first-paint widgets only. The waterfall is what loses on mobile and HTTP/2 cannot save it; a content-hashed vendor chunk with the runtime split out keeps caches warm across deploys; and preload defends current-critical chunks while prefetch warms likely-next ones — never lazy-load above the fold. Now when you encounter a code-splitting decision in production, you will reach for the waterfall count first — how many sequential round trips, not how many kilobytes — and that question will point you to the right fix every time.

Something unclear?

Ask a question about this lesson. Questions are anonymous and go straight to the author to make the lesson better.

shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.