Lazy Loading
Deferring the fetch of a resource until it is needed, or until the browser is idle.
Lazy loading defers fetching a resource — a script, an image, a component, a font — until something establishes that it is needed. It is the most reliable way to reduce what a page costs on first load, because the cheapest byte is the one never requested.
Common forms include images and iframes deferred until near the viewport (now a native HTML attribute), components loaded on interaction or on visibility, and route code fetched when a route is entered. On the server side the equivalent is deferring a slow data fetch behind a streaming boundary so the shell renders immediately.
Two hazards recur. Deferral changes timing, and timing is observable. A script that only loads after a genuine user gesture will not load in an automated test that dispatches a synthetic event at an element rather than at the document — a real class of test that passes locally and fails in headless. Deferral can be undone by accident, since a single eager import elsewhere in the graph can pull the deferred module back into the initial chunk. See Module Graph.
Lazy loading interacts with perceived performance rather than just measured performance: something loading late is only an improvement if the page is usable meanwhile, which is what skeleton states and streaming boundaries provide.
See also6
Hand-picked in the note itself — the neighbours worth reading next.
Code Splitting
Dividing an application bundle so a page downloads only the code it needs.
Web Platform12 connections
Critical Rendering Path
The sequence of steps between receiving HTML and painting pixels, and everything that blocks it.
Web Platform9 connections
Core Web Vitals
Google's small set of user-centred performance metrics: loading, interactivity, and visual stability.
Web Platform12 connections
Islands Architecture
Rendering a page as static HTML with small independently interactive regions.
Web Platform15 connections
React Server Components
Components that execute only on the server and never ship their code to the browser.
Web Platform16 connections
Streaming Response
Delivering a response incrementally as it is produced rather than all at once when complete.
Networks & Distribution9 connections
Related2
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from11
Notes elsewhere in the wiki that reach for this one.
- Client-Server BoundaryWeb Platform
The line in an application where execution moves from the server to the browser.
- Code SplittingWeb Platform
Dividing an application bundle so a page downloads only the code it needs.
- Core Web VitalsWeb Platform
Google's small set of user-centred performance metrics: loading, interactivity, and visual stability.
- Critical Rendering PathWeb Platform
The sequence of steps between receiving HTML and painting pixels, and everything that blocks it.
- HydrationWeb Platform
Attaching client-side behaviour to server-rendered markup without rebuilding it.
- Islands ArchitectureWeb Platform
Rendering a page as static HTML with small independently interactive regions.
- Module GraphWeb Platform
The directed graph of imports that decides what code ends up where.
- Performance BudgetWeb Platform
A committed numeric ceiling on a page's cost, enforced automatically.
- React Server ComponentsWeb Platform
Components that execute only on the server and never ship their code to the browser.
- Streaming ResponseNetworks & Distribution
Delivering a response incrementally as it is produced rather than all at once when complete.
- Tree ShakingWeb Platform
Statically removing exports that nothing imports, shrinking the shipped bundle.