What is Code splitting?
The short answer
Code splitting breaks a site's JavaScript into smaller chunks so each page downloads only the code it needs, loading the rest on demand.
Code splitting, explained
Heavy features like 3D scenes, editors and charts belong in their own chunks, fetched only when a visitor uses them.
Questions people ask about Code splitting
What is Code splitting?
Code splitting breaks a site's JavaScript into smaller chunks so each page downloads only the code it needs, loading the rest on demand.
Related terms
Lazy loading delays downloading images, video, scripts or components until they are about to be needed, usually when they scroll into view.
BundlerA bundler combines a project's many source files and dependencies into optimised files the browser can load efficiently; Vite, webpack and Turbopack are common ones.
Page speedPage speed is how quickly a web page loads and becomes usable, measured by metrics like Largest Contentful Paint, Interaction to Next Paint and layout stability.
DOMThe DOM is the browser's live, tree-shaped model of a web page; JavaScript reads and changes the DOM to update what visitors see.
Part of the Web Encyclopedia by Apex Flow Digital. Definitions are general knowledge, kept current, with no invented statistics.