Web Framework Internals interview question · Most asked
What happens in the browser from navigation to an interactive single-page app?
Summary
DNS, TLS and the HTML request; parsing HTML and downloading CSS and JavaScript; the framework renders the app (or hydrates server-rendered HTML); effects or mounted hooks run and often start data requests; components re-render with data. Client-side navigations then change routes without full reloads, running router guards or loaders.
Longer Answer
Fetching in nested effects creates request waterfalls; load data at the route level and in parallel. Hydration mismatches happen when server and client render different output.
Key Points
- Navigation → HTML → assets → render/hydrate.
- Effects after render start fetches.
- Router guards/loaders on navigation.
- Avoid waterfalls and mismatches.
Deep dive: Request Lifecycle: The Browser Side: React and Vue Page Loads
Explanation
What interviewers look for
Correct sequence and the waterfall issue.
More most-asked Web Framework Internals questions
- What is a request lifecycle, and why should a backend engineer know it for their framework?
- What layers does a request pass through before reaching application code, and how should their timeouts relate?
- How does Express handle a request, and how are errors routed?
- What is the NestJS request lifecycle?
- Describe the Spring MVC request flow and where exceptions are handled.
- Where should authentication, authorisation, validation and error formatting live in a web framework?
- Walk through the Laravel request lifecycle and say where you would add code that must run on every request.
- Walk through the Django request lifecycle.