Performance
Core Web Vitals, loading, rendering and making slow pages fast.
18 lessons 52 practice questions about 2 hours of reading
Chapter 1, beginner
Foundations
What it is and how it works, the questions every round starts with.
- 01What is a CDN, and how does it make sites faster?
Lesson, 4 min read, then 4 questions to practise
- Design image delivery for an e-commerce site: responsive images, AVIF and WebP, CDN transforms, the LCP image and placeholders
- Design book search end to end: instant suggestions, a server-rendered results page, CDN caching and the search backend
- Choose Cache-Control headers for hashed assets, HTML and API responses
- Design a flash sale page for a million concurrent users like Big Billion Days: countdown sync, queueing, inventory and graceful degradation
Chapter 2, intermediate
In depth
How it behaves under the hood, and the follow-ups that come next.
- 02How do you improve website performance?
Lesson, 4 min read, then 6 questions to practise
- Diagnose and fix a poor LCP on a product page
- Investigate a bundle that grew from 300 KB to 900 KB and enforce budgets in CI
- Choose resource hints for a landing page: preload, preconnect, prefetch, modulepreload and fetchpriority
- Choose gzip, Brotli, zstd or no compression by total time: transfer, decompression and parse
- Simulate how the browser picks an image from srcset and sizes: width and density descriptors and DPR
- Build a request waterfall from Resource Timing: connection phases and the chain that delays the LCP image
- 03How do you load web fonts without layout shift?
Lesson, 6 min read, then 4 questions to practise
- Fix layout shifts from ads, web fonts, images and late banners
- Load web fonts with the FontFace API: a timeout, a fallback and a single class swap
- Design a multilingual Indian news app: Indic fonts, transliteration input, Urdu right-to-left, per-language SEO and low bandwidth
- Design a news article page like the New York Times: ads without layout shift, a metered paywall, speed, SEO and sharing
- 04How do you optimise images for the web?
Lesson, 6 min read, then 1 question to practise
- 05How do you prevent layout shift (CLS) in feeds and lazy-loaded images?
Lesson, 8 min read, then 3 questions to practise
- 06How do you reduce JavaScript bundle size?
Lesson, 5 min read, then 3 questions to practise
- 08RUM vs synthetic monitoring: what is the difference?
Lesson, 6 min read, then 3 questions to practise
- 09What are Core Web Vitals: LCP, INP and CLS?
Lesson, 5 min read, then 1 question to practise
- 10What is islands architecture, and how is it different from partial hydration?
Lesson, 6 min read, then 4 questions to practise
- Choose a rendering strategy per route for a marketplace
- Check React Server Component boundaries: missing 'use client', server-only imports in client code and non-serialisable props
- Stream a Server Components-style payload: $L placeholders, client references and out-of-order rows
- Implement useIntersectionObserver() for lazy loading
- 11What is lazy loading for images and routes?
Lesson, 4 min read
- 12What is LCP (Largest Contentful Paint) in Core Web Vitals?
Lesson, 12 min read
- 13What is the Save-Data header and how should a site respond to it?
Lesson, 5 min read, then 4 questions to practise
- Choose a loading plan for slow networks: image quality, prefetching, autoplay and timeouts from network hints
- Build a hover-intent prefetch scheduler: delay, cancel on leave, concurrency and byte budget, and Save-Data
- Design adaptive media quality for slow networks: reduced-data mode, quality tiers and user override
- Design a lightweight PWA for low-end Android on slow networks like Flipkart Lite: budgets, app shell, data saving and offline
- 14
Chapter 3, advanced
Senior level
Trade-offs, edge cases and the questions senior rounds end on.
- 15How do you find and fix memory leaks in a web app?
Lesson, 6 min read, then 5 questions to practise
- Find and fix an SPA memory leak with heap snapshots
- Fix a DOM node registry that leaks: callback refs with cleanup functions
- Implement a memory-efficient event bus with lifecycle cleanup and leak detection
- Create and revoke upload preview URLs with useObjectUrl
- Build a weak-value cache with WeakRef and FinalizationRegistry, and test it with a fake garbage collector
- 16What is a long task, and how do you keep the main thread responsive?
Lesson, 6 min read, then 3 questions to practise
- 17What is INP (Interaction to Next Paint) in Core Web Vitals?
Lesson, 11 min read, then 2 questions to practise
- 18What is list virtualization (windowing)?
Lesson, 4 min read, then 5 questions to practise
- Implement a virtualized list rendering 100,000 items efficiently
- Implement a virtualized grid with variable row heights, overscan, and scroll restoration
- Design a live deployment log viewer: streaming, virtualisation, ANSI colours, search and resume
- Design a Jira-style issue board for 10,000 issues: virtualised columns, rank keys, live updates and conflicts
- Design a chart that renders 50,000 points: canvas, downsampling, hit-testing and accessibility