PrepPilotPractise free

Browser & Web Performance interview questions

Rendering pipeline, Core Web Vitals, bundles, caching

16 questions · LCP · updated November 2026

Practise these as flashcards. One or two lines each; the ones you miss come back first.

Start free

Core questions

What is the critical rendering path in a browser?

It'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.

What is the difference between reflow and repaint?

Reflow recalculates the layout and geometry of elements, which can be expensive, while repaint only updates the appearance (like color) without affecting layout.

Name the three Core Web Vitals and what they measure.

LCP measures loading performance, INP measures interaction latency, and CLS measures visual stability during page load.

Why is bundle size important for web performance?

A smaller bundle size means less JavaScript to download, parse, and execute, resulting in faster load times and better user experience.

Intermediate questions

How does tree shaking work in modern JavaScript bundlers?

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.

Explain code splitting and when you would use it.

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.

How can you optimize images for web performance?

Use modern formats like WebP, compress images, serve responsive sizes with srcset, and enable lazy loading to avoid loading offscreen images initially.

What is the purpose of a CDN in web performance?

A CDN distributes static assets across geographically dispersed servers, reducing latency and speeding up asset delivery to users around the world.

How does 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.

How can you use Chrome DevTools to identify a layout thrashing issue?

Record a performance profile, look for frequent layout and style recalculations, and check if repeated DOM reads and writes are causing excessive reflows.

What is a service worker and how does it help with caching?

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.

Senior questions

Describe a strategy to optimize LCP on a media-heavy landing page.

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.

How would you debug a high CLS score in production?

See the answer in the app, free

What are the trade-offs between long-term caching and cache busting for static assets?

See the answer in the app, free

How do you ensure your code splitting strategy doesn't negatively impact INP?

See the answer in the app, free

How can you use service workers to implement a stale-while-revalidate caching strategy?

See the answer in the app, free

More Frontend topics