Which snippet should I use?

Which snippet should I use?

Start from the symptom you see, not from the snippet name. Each table lists the snippet to run first and what to run next depending on what it shows. The same decision trees drive the agent skills, so an agent follows the same path.

If you are not sure where to start, run LCP, CLS and INP. They tell you which of the sections below applies.

Core Web Vitals are failing

SymptomStart withThen
Largest Contentful Paint is slowLCPLCP subparts to find the slow phase, then LCP trail to see how the candidate changes
The LCP element is an imageLCPImage element audit, LCP image entropy and priority hints audit
The LCP element is a videoLCP video candidateVideo element audit
Layout shifts during loadCLSLayout shifts during loading and interaction, Find above-the-fold lazy-loaded images and Fonts preloaded, loaded and used above the fold
Slow interactionsINPInteractions, then Input latency breakdown

The page loads slowly

SymptomStart withThen
The server responds lateTTFBTTFB sub-parts to see which phase is slow, TTFB for all resources to find slow requests, Server-Timing and Early Hints for the backend phases, and Service worker analysis if a service worker is involved
Nothing shows for a long timeFCPFind render-blocking resources, then Critical CSS detection
Scripts block renderingScript loadingValidate preload, async and defer scripts and JS execution time breakdown
Third-party scripts are suspectedThird-party impact by domainFirst and third-party script info and First and third-party script timings
Text files are sent uncompressedCompression auditFind render-blocking resources to see whether they also block rendering
Inlined CSS or scripts are heavyInline CSS info and sizeInline script info and size
Long pages take a long time to renderContent visibilityDOM size and depth
Fonts load late or shift the layoutFonts preloaded, loaded and used above the foldWebfont usage analyzer for faces that load but are never used
Resource hints look wrongResource hints validationPriority hints audit and Prefetch resource validation
The site is built with a JavaScript frameworkSSR hydration data analysisJS execution time breakdown
Repeat visits are not fastCache strategy analysisService worker analysis

Navigation is not instant

SymptomStart withThen
Back and forward reload the pageBack-forward cacheFix the reasons it lists
The page redirects before it rendersClient-side redirect detectionTTFB
Next pages should feel instantSpeculation rules inspectorPrefetch resource validation

The page feels janky or frozen

SymptomStart withThen
Choppy scrollingScroll performanceLong animation frames
The page freezesLong tasksLong animation frames, then Long animation frames script attribution to name the scripts
Each interaction repeats expensive layout workForced synchronous layoutDOM size and depth
Content moves when the user clicksLayout shifts during loading and interactionInteractions
Animations stutterLong animation framesLong animation frames helpers

Images, video and SVG are heavy

SymptomStart withThen
Images are too big or blurryOversized imagesImage element audit
Above-the-fold images are lazy-loadedFind above-the-fold lazy-loaded imagesPriority hints audit
Offscreen images load eagerlyFind non-lazy-loaded images outside of the viewportImage element audit
Images combine loading="lazy" with fetchpriority="high"Find images with lazy and fetchpriorityPriority hints audit
Videos are slow to startVideo element auditLCP video candidate
SVG files are largeSVG embedded bitmap analysisOptimize the file, for example with SVGO

Some users have slow connections

SymptomStart withThen
Users on mobile or slow networks struggleNetwork bandwidth and connection qualityOversized images and Compression audit

Running the snippets

Paste any snippet into the DevTools console, or save it as a DevTools snippet, as described in How to use. To run them from a terminal or in CI, use the CLI. To read the result of a snippet as a report, paste its returned object in the visualizer.