惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
量子位
A
About on SuperTechFans
G
Google Developers Blog
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园_首页
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
U
Unit 42
Apple Machine Learning Research
Apple Machine Learning Research

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How to Audit Your Website's Core Web Vitals in Under 10 M...
Kui Luo · 2026-06-13 · via DEV Community

Kui Luo

Core Web Vitals measure three things: how fast your largest content element paints (LCP), how long before a user can interact with your page (INP), and how much the layout shifts during loading (CLS). Here is a practical guide to auditing all three without expensive tools.

What You Need

Metric Good Threshold Tool
LCP < 2.5 seconds Chrome DevTools Performance
INP < 200 milliseconds Chrome DevTools Performance
CLS < 0.1 Chrome DevTools Elements + Console

No paid subscription required. Chrome DevTools handles everything.

Step 1: Measure LCP

  1. Open your page in an incognito Chrome window
  2. Press F12 to open DevTools
  3. Go to the Performance tab
  4. Check "Web Vitals" in the settings gear
  5. Click the Record button and reload the page (Ctrl+Shift+R for a hard refresh)
  6. Stop the recording after the page finishes loading

Look for the LCP marker in the timeline. If it shows above 2.5 seconds, the largest image or text block is loading too slowly.

Common fixes ranked by impact:

  • Serve images in WebP format (typically 30-50 percent smaller than JPEG)
  • Add loading="eager" and explicit width/height to above-the-fold images
  • Preload the LCP element: <link rel="preload" as="image" href="hero.webp">
  • Move render-blocking CSS to non-critical paths or inline it

Step 2: Measure INP

  1. Stay in the Performance tab
  2. Click Record
  3. Click around the page naturally — open menus, click buttons, fill a form
  4. Stop the recording after 10-15 seconds of interaction

Check the INP value. Each click should show a response within 200 milliseconds. If interactions feel sluggish:

  • Defer non-essential JavaScript with <script defer>
  • Break long tasks (>50ms) using setTimeout chunking or requestIdleCallback
  • Reduce third-party scripts — each one adds to the main thread bottleneck
  • Use web workers for heavy computation

Step 3: Measure CLS

  1. Open the Elements tab
  2. Check for images and embeds without explicit dimensions
  3. Open the Console tab and run:
new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    console.log('CLS shift: ' + entry.value.toFixed(3), entry.sources);
  }
}).observe({ type: 'layout-shift', buffered: true });

  1. Scroll and interact with the page — watch for shift reports

If CLS exceeds 0.1:

  • Add width and height attributes to every <img> and <video>
  • Reserve space for dynamic ads and embeds with CSS containers
  • Avoid inserting content above existing content after initial render
  • Use font-display: swap with size-adjust to prevent text reflow

Quick Reference Checklist

  • [ ] LCP < 2.5s on a simulated 4G connection
  • [ ] INP < 200ms for all interactive elements
  • [ ] CLS < 0.1 with no visible jumps during load
  • [ ] Images have explicit dimensions and use modern formats
  • [ ] Third-party scripts are deferred or loaded asynchronously
  • [ ] CSS critical path is under 15 KB

Run this audit monthly. Core Web Vitals affect search rankings directly — pages that pass all three thresholds see an average 5-10 percent improvement in organic traffic within 60 days according to public data from large-scale studies.

The entire process takes about 8 minutes once you are familiar with the DevTools interface. No setup, no account creation, no export files to interpret.