Rendering pipeline, Core Web Vitals, bundles, caching
Practise these as flashcards. One or two lines each; the ones you miss come back first.
Start freeIt's the sequence of steps the browser takes to convert HTML, CSS, and JavaScript into pixels on the screen, including parsing, building the DOM and CSSOM, layout, and painting.
Reflow recalculates the layout and geometry of elements, which can be expensive, while repaint only updates the appearance (like color) without affecting layout.
LCP measures loading performance, INP measures interaction latency, and CLS measures visual stability during page load.
A smaller bundle size means less JavaScript to download, parse, and execute, resulting in faster load times and better user experience.
Tree shaking analyzes the dependency graph and removes unused exports from modules, so only the code that's actually used ends up in the final bundle.
Code splitting divides your codebase into smaller chunks that can be loaded on demand, such as loading a specific route's code only when the user navigates there, improving initial load time.
Use modern formats like WebP, compress images, serve responsive sizes with srcset, and enable lazy loading to avoid loading offscreen images initially.
A CDN distributes static assets across geographically dispersed servers, reducing latency and speeding up asset delivery to users around the world.
font-display: swap improve perceived performance?It allows text to be displayed immediately with a fallback font while the custom font loads, preventing invisible text during font loading.
Record a performance profile, look for frequent layout and style recalculations, and check if repeated DOM reads and writes are causing excessive reflows.
A service worker is a script that runs in the background, intercepting network requests and serving cached responses, enabling offline support and advanced caching strategies.
Prioritize loading the main image using preload, compress and serve it in modern formats, defer non-critical scripts, and minimize render-blocking CSS to ensure the largest content loads quickly.