Web Performance interview questions
100 Frontend Engineering practice questions. Read what a strong answer covers, then practise it out loud against the clock.
Practise Web Performance questionsBeginner
- A background video makes the page heavy
- A chat widget slows down every page
- A homepage loads slowly on mobile
- A large library is used for one small function
- async vs defer for scripts
- Browser caching basics
- Code splitting basics
- Content jumps when an ad loads
- Core Web Vitals explained
- First Contentful Paint
- HTTP/2 and HTTP/3 benefits
- Image optimisation basics
- Lab data vs field data
- Largest Contentful Paint
- Lazy loading images and iframes
- Lighthouse scores vary between runs
- Minification and compression
- Perceived performance
- Performance budgets
- Product images are several megabytes each
- Render-blocking resources
- Returning visitors download everything again
- Slow loading from a third-party font or image domain
- The cost of third-party scripts
- The hero image appears last
- The site is fast for developers but slow for customers
- The site loads many font files
- Time to First Byte
- Tree shaking
- Using browser DevTools for performance
- What a CDN does for performance
- What Lighthouse measures
- Why JavaScript size matters so much
- Why web performance matters
Intermediate
- A cookie consent banner hurts LCP and CLS
- A lazy loading library delays the main image
- A page has an extremely large DOM
- A search results page renders client-side and ranks poorly
- An interactive map makes the whole page slow
- Analysing JavaScript bundles
- Below-the-fold widgets slow down initial load
- Brotli, gzip and Zstandard compression
- Cache-Control strategies for different resources
- Clicking a filter button freezes the page briefly
- Common causes of layout shift and their fixes
- CSS content-visibility and containment
- Diagnosing a poor LCP on a product page
- Fetch Priority and browser resource prioritisation
- Hydration cost
- Icons are loaded as a heavy icon font
- Image CDNs and automatic optimisation
- Main thread work and long tasks
- Marketing tags are slowing down the site
- Most of the CSS on each page is unused
- Navigating between pages in a SPA feels slow
- Optimising the critical rendering path
- Performance keeps regressing after releases
- Redirect chains slow down page loads
- Rendering strategy impact on performance metrics
- Resource hints: preload, preconnect, dns-prefetch, prefetch
- Scroll-linked animations stutter
- Server response time is slow on dynamic pages
- Service worker caching strategies for performance
- Shipping too many polyfills to modern browsers
- The four sub-parts of LCP
- Total Blocking Time
- Yielding to the main thread
Experienced
- 103 Early Hints
- A data visualisation with thousands of points is slow
- A photo gallery with hundreds of high-resolution images
- A SaaS dashboard takes eight seconds to become usable
- A server-rendered page is unresponsive while hydrating
- A video platform's playback starts slowly
- Advanced font performance techniques
- An e-commerce site fails all three Core Web Vitals on mobile
- Attributing field performance problems to causes
- Breaking down INP into its phases
- Caching pages that include personalised content
- Choosing whether a build tool migration will help performance
- Compositing, layers and GPU acceleration
- Cutting JavaScript execution time in half
- Deciding whether a content site should stay a SPA
- Deciding whether to use WebAssembly for performance
- Improving performance of a legacy jQuery-heavy site
- Islands architecture and partial hydration for performance
- Layout shifts happen during client-side navigation
- Making pages eligible for the back/forward cache
- Memory and its impact on performance
- Micro-frontends caused duplicated code and slow pages
- Offloading work to Web Workers
- Poor INP traced to a third-party script
- Product wants a feature that will hurt performance
- Proving a performance improvement affects business metrics
- Running a performance improvement programme across a company
- Setting up alerting for performance in production
- The Long Animation Frames API
- The Speculation Rules API
- Users far from your servers get poor load times
- View transitions and perceived navigation speed
- Your app is unusable on low-end Android phones