The parser builds the DOM as HTML streams in, but a stylesheet blocks rendering because the browser will not paint with unstyled content, and a classic script without defer or async blocks the parser entirely. Once CSS and blocking scripts are done, the browser builds the render tree, lays out, paints and composites. The usual culprits are render blocking CSS, synchronous scripts in the head and late discovered fonts or hero images.
Why interviewers ask this
The interviewer wants to know if you can reason from first principles about load performance instead of reciting a Lighthouse checklist. Mentioning the preload scanner, defer versus async and resource priority shows real familiarity. It also sets up follow ups on LCP, since the fix depends on whether the bottleneck is discovery, network, or the main thread being tied up parsing and executing scripts.
How to structure your answer
- Trace the pipeline in order: parse, style, layout, paint, composite.
- Separate what blocks the parser from what blocks the paint.
- Mention the preload scanner and resource discovery.
- Finish with the two or three fixes you would try first.
Example answer
As the HTML streams in the parser builds the DOM incrementally, and in parallel the preload scanner looks ahead for images, scripts and stylesheets so it can start fetching early. CSS is render blocking, because the browser will not paint content it might have to restyle a frame later, so a slow stylesheet holds up first paint even if the DOM is ready. A classic script tag with no defer or async is worse, since it blocks parsing entirely while it downloads and runs. Once styles are in, the browser builds the render tree, does layout, paints and composites. When I get a four second first paint, my first three checks are whether any script in the head is blocking, whether the CSS is one enormous file that could be split into a critical inline chunk, and whether the LCP image is discoverable in the HTML rather than injected by JavaScript. On the last site I fixed, adding a preload for the hero image and moving a tag manager script to defer took about 1.6 seconds off LCP on 4G.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- What is the practical difference between defer and async for you?
- How does the preload scanner change what you put in the initial HTML?
- When is inlining critical CSS worth the cache cost?
Related frontend developer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions