Skip to main content

Practice ยท 1 of 3

Diagnose the Broken Page

A page spec is { htmlKB, cssKB, jsKB, imageKB, ttfbMs, renderBlocking: [types], imageCount, heroLazy }. Write diagnose(page) returning the SINGLE dominant issue as a string, by these rules (first match wins): ttfbMs > 800 => "slow-server"; heroLazy true => "lazy-hero"; any "css" in renderBlocking => "blocking-css"; imageKB > 2000 => "oversized-images"; jsKB > 500 => "heavy-js"; otherwise "healthy".

Difficulty: intermediate

Back to lesson: Practice: Slow Page Clinic โ€” Practice