Skip to content

Instantly share code, notes, and snippets.

@bcoe
Last active March 18, 2025 18:20
Show Gist options
  • Save bcoe/d17243219f481cbf84f95a2664c2b23a to your computer and use it in GitHub Desktop.
Save bcoe/d17243219f481cbf84f95a2664c2b23a to your computer and use it in GitHub Desktop.
Ideas for Detecting Web Vitals Problems
Idea How We'd Detect It
Notify users when image not served from cache / CDN. Header attributes on image asset spans.
Suggest file formats such as WebP or AVIF. Image asset span has an extension like .bmp.
Notify of render blocking assets during pageload. Look at structure of resource.script spans.
Notify when page has >800 DOM elements. On bad INP count DOM nodes.
Warn on long animation frames correlated to INP. Long animation frame API
Slow database calls that correlate to a bad TTFB. Correlate TTFB to a corresponding DB call
Slow backend route calls that correspond a bad TTFB. Correlate http.server spans to bad TTFB.
Warn about images missing dimensions. When a bad CLS occurs, collect images without dimension attributes on page.
Warn if web fonts are slow to load (contributing to CLS). Resource timing API.
Detect whether slow LCP is caused by a slow API call. Detect when an http.client span completes immediately before an LCP node.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment