Home
← All questions

How to improve the performance of a web application? | Web Fundamentals

MediumPremiumWeb Fundamentals

Web Fundamentals interview practice: Enumerate front-end performance optimization techniques across load and runtime.

Answer

Network / loading:

  • Code splitting & lazy loading (import(), route-based chunks).
  • Minify, compress (gzip/brotli), tree-shake; reduce bundle size.
  • HTTP caching (Cache-Control, ETags), CDN, HTTP/2-3.
  • Preload/prefetch critical assets; defer/async scripts.
  • Image optimization: modern formats (WebP/AVIF), responsive srcset, lazy loading="lazy".

Rendering:

  • Minimize critical render path; inline critical CSS.
  • Avoid layout thrashing (batch DOM reads/writes).
  • Virtualize long lists (windowing).
  • Debounce/throttle expensive handlers.

React/runtime:

  • React.memo, useMemo, useCallback, stable keys.
  • Avoid unnecessary re-renders and large context updates.

Measure first: use Lighthouse, Web Vitals (LCP, CLS, INP) to find the real bottleneck before optimizing.

Premium question

Unlock the full model answer with Mentoxis Premium.

Unlock with Premium