Browser Interview Questions

12 Browser interview questions with worked answers, complexity notes, and runnable code you can edit in the browser — ordered easy to hard so you build up steadily. Free, no signup. Open any question for the full answer.

Why the platform underneath matters

Frameworks abstract the browser, but interviews for senior roles peel that abstraction back. The question behind most of these is: what actually happens between typing a URL and seeing pixels? A request resolves DNS, opens a connection, and streams HTML; the parser builds the DOM, CSS builds the CSSOM, the two combine into a render tree, and layout → paint → composite turn that tree into what you see. Every performance question you will ever get is a variation on “which step did you block, and for how long?”

Two distinctions separate people who memorized a framework from people who understand the runtime. First, reflow versus repaint: changing geometry forces the browser to recompute layout, while changing color only repaints — and knowing which properties trigger which is how you keep animations on the compositor. Second, the storage options — cookies, localStorage, sessionStorage, and IndexedDB — each with different size limits, lifetimes, synchronicity, and whether they ride along on every request.

The security model is part of the platform too: the same-origin policy is the default that keeps one site from reading another, and CORS is the controlled exception. The scheduling and observation APIs — requestAnimationFrame, IntersectionObserver, requestIdleCallback — exist because polling and scroll handlers are how you jank a page. These questions build from the rendering path up through storage and events into the observer APIs, so that when a framework does something surprising, you can explain it from the layer below.

Easy

Medium

Hard

Other topics

HTML/CSS · JavaScript · TypeScript · React · System Design · Accessibility · Web Performance · Testing · Networking/Security · DSA

← Search all 265 questions