Loading...
Loading...
Compare original and translation side by side
| Score Range | Rating | Icon |
|---|---|---|
| 90-100 | Good | 🟢 Green circle |
| 50-89 | Needs Improvement | 🟡 Amber square |
| 0-49 | Poor | 🔴 Red triangle |
| 分数范围 | 评级 | 图标 |
|---|---|---|
| 90-100 | 良好 | 🟢 绿色圆形 |
| 50-89 | 需要改进 | 🟡 黄色方形 |
| 0-49 | 较差 | 🔴 红色三角形 |
| Metric | Good | Needs Improvement | Poor |
|---|---|---|---|
| FCP (First Contentful Paint) | [0, 1800 ms] | [1800 ms, 3000 ms] | > 3000 ms |
| LCP (Largest Contentful Paint) | [0, 2500 ms] | [2500 ms, 4000 ms] | > 4000 ms |
| CLS (Cumulative Layout Shift) | [0, 0.1] | [0.1, 0.25] | > 0.25 |
| INP (Interaction to Next Paint) | [0, 200 ms] | [200 ms, 500 ms] | > 500 ms |
| TTFB (Time to First Byte) | [0, 800 ms] | [800 ms, 1800 ms] | > 1800 ms |
| 指标 | 良好 | 需要改进 | 较差 |
|---|---|---|---|
| FCP(First Contentful Paint) | [0, 1800 毫秒] | [1800 毫秒, 3000 毫秒] | > 3000 毫秒 |
| LCP(Largest Contentful Paint) | [0, 2500 毫秒] | [2500 毫秒, 4000 毫秒] | > 4000 毫秒 |
| CLS(Cumulative Layout Shift) | [0, 0.1] | [0.1, 0.25] | > 0.25 |
| INP(Interaction to Next Paint) | [0, 200 毫秒] | [200 毫秒, 500 毫秒] | > 500 毫秒 |
| TTFB(Time to First Byte) | [0, 800 毫秒] | [800 毫秒, 1800 毫秒] | > 1800 毫秒 |
srcset<!-- Bad -->
<img src="large-image.jpg" alt="Description" />
<!-- Good -->
<img
src="image.webp"
srcset="image-small.webp 400w, image-medium.webp 800w, image-large.webp 1200w"
sizes="(max-width: 600px) 400px, (max-width: 1200px) 800px, 1200px"
width="1200"
height="800"
alt="Description"
loading="lazy"
/>srcset<!-- Bad -->
<img src="large-image.jpg" alt="Description" />
<!-- Good -->
<img
src="image.webp"
srcset="image-small.webp 400w, image-medium.webp 800w, image-large.webp 1200w"
sizes="(max-width: 600px) 400px, (max-width: 1200px) 800px, 1200px"
width="1200"
height="800"
alt="Description"
loading="lazy"
/>asyncdefer<!-- Bad -->
<link rel="stylesheet" href="styles.css" />
<script src="app.js"></script>
<!-- Good -->
<link
rel="stylesheet"
href="styles.css"
media="print"
onload="this.media='all'"
/>
<link rel="preload" href="critical.css" as="style" />
<script src="app.js" defer></script>asyncdefer<!-- Bad -->
<link rel="stylesheet" href="styles.css" />
<script src="app.js"></script>
<!-- Good -->
<link
rel="stylesheet"
href="styles.css"
media="print"
onload="this.media='all'"
/>
<link rel="preload" href="critical.css" as="style" />
<script src="app.js" defer></script>rel="preconnect"rel="dns-prefetch"rel="preload"rel="prefetch"<!-- Good -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="dns-prefetch" href="https://api.example.com" />
<link rel="preload" href="hero-image.webp" as="image" />rel="preconnect"rel="dns-prefetch"rel="preload"rel="prefetch"<!-- Good -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="dns-prefetch" href="https://api.example.com" />
<link rel="preload" href="hero-image.webp" as="image" />/* Bad */
.image-container {
width: 100%;
/* height not set - causes CLS */
}
/* Good */
.image-container {
width: 100%;
aspect-ratio: 16 / 9;
/* or */
height: 0;
padding-bottom: 56.25%; /* 16:9 ratio */
}/* Bad */
.image-container {
width: 100%;
/* height not set - causes CLS */
}
/* Good */
.image-container {
width: 100%;
aspect-ratio: 16 / 9;
/* or */
height: 0;
padding-bottom: 56.25%; /* 16:9 ratio */
}// Bad - loading everything upfront
import { heavyLibrary } from "./heavy-library";
// Good - lazy load when needed
const loadHeavyLibrary = () => import("./heavy-library");// Bad - loading everything upfront
import { heavyLibrary } from "./heavy-library";
// Good - lazy load when needed
const loadHeavyLibrary = () => import("./heavy-library");font-display: swapoptional/* Good */
@font-face {
font-family: "CustomFont";
src: url("font.woff2") format("woff2");
font-display: swap; /* or optional */
}font-display: swapoptional/* Good */
@font-face {
font-family: "CustomFont";
src: url("font.woff2") format("woff2");
font-display: swap; /* or optional */
}Cache-Control: public, max-age=31536000, immutableCache-Control: public, max-age=31536000, immutablerel="noopener"<!-- Good -->
<script async src="https://www.google-analytics.com/analytics.js"></script>rel="noopener"<!-- Good -->
<script async src="https://www.google-analytics.com/analytics.js"></script><!-- Bad -->
<img src="chart.png" />
<!-- Good -->
<img src="chart.png" alt="Sales increased 25% from Q1 to Q2" /><!-- Bad -->
<img src="chart.png" />
<!-- Good -->
<img src="chart.png" alt="第一季度到第二季度销售额增长25%" /><!-- Good -->
<button aria-label="Close dialog">×</button><!-- Good -->
<button aria-label="关闭对话框">×</button><!-- Good -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Page description" />
<title>Page Title</title><!-- Good -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="页面描述" />
<title>页面标题</title><!-- Bad -->
<a href="/about">Click here</a>
<!-- Good -->
<a href="/about">Learn more about our company</a><!-- Bad -->
<a href="/about">点击这里</a>
<!-- Good -->
<a href="/about">了解更多关于我们公司的信息</a>