All courses
Course ยท Premium

How the Browser Runs and Renders Your Code

The event loop and rendering, one step at a time. Predict any output order, and fix a page that freezes.
10
Lessons
101
Steps
About 1.5 hours
Duration
Your own
Pace
Curriculum
  1. 01
    One thread, one call stack
    Premium
    What runs your code, and what happens while it's busy.
  2. 02
    Macrotasks: how waiting works without blocking
    Premium
    The clicks during the freeze weren't lost. Where did they wait?
  3. 03
    Microtasks: the queue that goes first
    Premium
    A promise queued after the autosave ran before it. Why?
  4. 04
    Promises and await on the event loop
    Premium
    Two chains at once, then await: which line runs when?
  5. 05
    What happens in a frame
    Premium
    "Running tests..." never shows. Why?
  6. 06
    requestAnimationFrame, and timing your updates
    Premium
    The progress bar stutters. Timer or requestAnimationFrame?
  7. 07
    Layout, paint, composite: what each change costs
    Premium
    Can a spinner keep spinning while the tests block?
  8. 08
    Layout thrashing
    Premium
    Adding "Show more" to 500 results takes over 200 ms. Why?
  9. 09
    Long tasks and yielding
    Premium
    The question search lags on every key. Why?
  10. 10
    Debugging slow interactions (INP)
    Premium
    Users say Run "feels slow". Where do you start?
  11. Final
    The output challenge
    Premium
    Twelve questions from across the course. Pass it to claim your certificate.