Skip to main content

Practice · 1 of 3

Diagnose the Broken Page

CHALLENGE
Difficulty: intermediate+25 XP

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".

Back to lesson: Practice: Slow Page Clinic — Practice