# 网页性能

**网页性能**（Web performance）是指网页加载和响应的速度与流畅程度，既可以从客观层面衡量——加载时间、每秒帧数、达到可交互的时间，也可以从主观层面衡量——用户感觉加载了多久。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Performance)</sup><sup> • </sup><sup>[2](https://developer.mozilla.org/en-US/docs/Glossary/Web_performance)</sup> 它涵盖从发起内容请求到内容在浏览器中显示的完整路径，包括渲染时间以及用户对加载时间和运行时体验的主观感受。<sup>[2](https://developer.mozilla.org/en-US/docs/Glossary/Web_performance)</sup> W3C网页性能工作组章程规定了相关API的标准化，用于测量网络与渲染性能、响应性与交互性、内存与CPU占用以及应用故障，覆盖页面加载和持续交互两种场景。<sup>[3](https://www.w3.org/2023/11/webperf-charter-2023.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心网页指标阈值 | LCP在2.5秒以内，INP不超过200毫秒，CLS不超过0.1，按页面加载的第75百分位评估，分移动端和桌面端统计<sup>[4](https://web.dev/articles/vitals)</sup> |
| INP取代FID | 2024年3月12日；INP测量所有交互的完整延迟，FID只测量首次交互的输入延迟<sup>[5](https://web.dev/blog/inp-cwv-launch)</sup><sup> • </sup><sup>[6](https://almanac.httparchive.org/en/2024/performance)</sup> |
| 页面重量中位数（2024年10月） | 桌面端2,652 KB，移动端2,311 KB，而2014年10月分别为1,208 KB和505 KB<sup>[7](https://almanac.httparchive.org/en/2024/page-weight)</sup> |
| 实测通过率 | 67.7%的页面达到LCP阈值，85.9%达到INP阈值，80.3%达到CLS阈值；54.4%三项全部达标<sup>[8](https://courses.isds.tugraz.at/iaweb/surveys/ws2025/iaweb-ws2025-g2-survey-web-perf.pdf)</sup> |
| 商业证据 | 速卖通报告加载时间缩短36%，订单量增长10.5%（2016年）<sup>[9](https://dl.acm.org/doi/pdf/10.1145/3309697.3331483)</sup> |
| 实验室与实测 | Lighthouse无法测量INP，因为它在加载页面时没有用户输入；总阻塞时间作为实验室替代指标<sup>[4](https://web.dev/articles/vitals)</sup> |

## 页面的加载过程

一次导航从重定向开始，然后是DNS查询、TCP连接、TLS协商、HTTP请求和服务器处理。首字节时间（TTFB）衡量从用户发起加载到浏览器收到响应第一个字节的时间，包括重定向时间、DNS查询、连接与TLS协商以及请求处理；800毫秒被认为是良好TTFB的阈值，但有一些附加条件。<sup>[6](https://almanac.httparchive.org/en/2024/performance)</sup> 收到第一个字节后，浏览器下载文档和子资源、解析HTML并进行渲染。

延迟并不集中在某一处。一项关于降低延迟技术的调查发现：网络结构（如服务器部署位置和次优路由）对延迟有显著贡献；通信端点之间的每次交互都会增加一个往返时间，对短数据流尤为明显；排队延迟在传输路径延迟累积中占主导地位。<sup>[10](https://dl.acm.org/doi/10.1109/COMST.2014.2375213)</sup> 同一调查的结论是，没有任何单一延迟源在所有情况下都占主导，许多延迟源是间歇性的且变化很大。<sup>[10](https://dl.acm.org/doi/10.1109/COMST.2014.2375213)</sup> W3C导航计时第2级规范通过`PerformanceNavigationTiming`接口向脚本暴露这一生命周期，所有时间值均相对于条目的时间原点测量。<sup>[11](https://www.w3.org/TR/navigation-timing-2/)</sup>

## 指标与测量

**核心网页指标。** 谷歌的这项计划定义了三个实测指标：[最大内容绘制](https://www.edgepedia.org/zh/largest-contentful-paint)（LCP）用于衡量加载，应在页面开始加载后2.5秒内发生；交互到下次绘制（INP）用于衡量交互性，应在200毫秒或以下；[累积布局偏移](https://www.edgepedia.org/zh/cumulative-layout-shift)（CLS）用于衡量视觉稳定性，应在0.1或以下。<sup>[4](https://web.dev/articles/vitals)</sup> 评估基于页面加载的第75百分位，分移动端和桌面端设备统计。<sup>[4](https://web.dev/articles/vitals)</sup>

**实测与实验室。** Chrome用户体验报告（CrUX）收集每项核心网页指标的匿名真实用户测量数据，并为Chrome DevTools、PageSpeed Insights和Search Console的核心网页指标报告等工具提供数据支持。<sup>[4](https://web.dev/articles/vitals)</sup> 优化文献中提到的实验室工具包括Google PageSpeed Insights、WebPageTest、GTmetrix和[Lighthouse](https://www.edgepedia.org/zh/lighthouse)。<sup>[12](https://link.springer.com/chapter/10.1007/978-3-032-00441-3_42)</sup> 两种视角在设计上就有分歧：Lighthouse在无用户的模拟环境中加载页面，因此无法测量INP，所以使用实验室可测量的[总阻塞时间](https://www.edgepedia.org/zh/total-blocking-time)（TBT）指标作为替代。<sup>[4](https://web.dev/articles/vitals)</sup>

## 性能的决定因素

**页面重量。** 2024年10月桌面端页面重量中位数为2,652 KB，移动端为2,311 KB，而2014年10月分别为1,208 KB和505 KB。<sup>[7](https://almanac.httparchive.org/en/2024/page-weight)</sup> 桌面端页面加载的HTML中位数为18 KB、CSS 78 KB、字体131 KB、[JavaScript](https://www.edgepedia.org/zh/javascript) 613 KB、图片1,054 KB；移动端分别为18 KB、73 KB、111 KB、558 KB和900 KB。<sup>[7](https://almanac.httparchive.org/en/2024/page-weight)</sup> 在第90百分位，桌面端页面重量达到8,375 KB，移动端达到7,680 KB。<sup>[7](https://almanac.httparchive.org/en/2024/page-weight)</sup> HTTP Archive报告页面重量与最大内容绘制之间存在明显相关性，移动端曲线陡峭得多。<sup>[7](https://almanac.httparchive.org/en/2024/page-weight)</sup>

**关键路径上的JavaScript。** 对Chromium浏览器的因果分析发现，JavaScript对页面加载关键路径的贡献大于HTML解析，将JavaScript阶段优化20%可使桌面浏览器的平均页面加载时间改善近5%。<sup>[9](https://dl.acm.org/doi/pdf/10.1145/3309697.3331483)</sup> 同一研究发现，在典型条件下，改善网络连接和启用浏览器缓存对页面加载时间影响很小，这意味着HTML解析和DOM操作等计算是浏览器端的瓶颈。<sup>[9](https://dl.acm.org/doi/pdf/10.1145/3309697.3331483)</sup>

## 优化技术

**协议。** 在一项对38个网站的受控测试台比较中，将TCP参数调整为匹配QUIC的默认值大幅缩小了TCP+TLS+HTTP/2与QUIC之间的性能差距；QUIC的剩余优势集中在连接建立和有损网络上，在有损网络中各个流可以独立推进，不受队头阻塞影响。<sup>[13](https://www.irtf.org/anrw/2019/anrw2019-final25-acmpaginated.pdf)</sup> 在有损网络中，[拥塞控制算法](https://www.edgepedia.org/zh/congestion-control-algorithm)的选择对性能的影响大于协议本身的选择。<sup>[13](https://www.irtf.org/anrw/2019/anrw2019-final25-acmpaginated.pdf)</sup> 文献中记录的早期方案包括SPDY协议、mod_pagespeed服务器扩展、DNS预解析、TCP预连接、TCP快速打开和ASAP。<sup>[14](https://www.usenix.org/system/files/conference/nsdi13/nsdi13-final177.pdf)</sup>

**压缩。** 在一项实验中，Brotli将1 GB数据集压缩了32%，但压缩速度为0.7 Kb/s，解压速度为380 Mb/s；而Gzip使数据体积缩减了23%，压缩速度27 Mb/s，解压速度270 Mb/s：Brotli以高得多的压缩时间成本换取更小的载荷，这对动态压缩的响应很重要。<sup>[8](https://courses.isds.tugraz.at/iaweb/surveys/ws2025/iaweb-ws2025-g2-survey-web-perf.pdf)</sup>

## 数据一览

截至2024年的十年间，桌面端页面重量大约翻了一倍，移动端增至原来的四倍多。<sup>[7](https://almanac.httparchive.org/en/2024/page-weight)</sup> 对照核心网页指标阈值，近期CrUX数据显示约67.7%的页面达到LCP阈值2.5秒或以下，85.9%达到INP阈值200毫秒或以下，80.3%达到CLS阈值0.1或以下，54.4%三项同时达标。<sup>[8](https://courses.isds.tugraz.at/iaweb/surveys/ws2025/iaweb-ws2025-g2-survey-web-perf.pdf)</sup> 商业论证建立在速卖通2016年报告等测量数据之上：加载时间缩短36%，订单量增长10.5%。<sup>[9](https://dl.acm.org/doi/pdf/10.1145/3309697.3331483)</sup> 性能指标也影响搜索引擎排名，因此开发者会跟踪当前相关指标以保持可见度。<sup>[15](https://arxiv.org/pdf/2412.07892)</sup>

## 与其他方案的比较

在网页体验质量（QoE）研究中，用户对页面加载等待时间的主观感受被认为是关键的QoE特征，页面加载时间则是核心客观指标。<sup>[16](https://link.springer.com/article/10.1007/s41233-017-0009-2)</sup> 即便是页面加载时间作为感知替代指标也有局限：QUIC研究改用视觉指标（首次视觉变化、速度指数、视觉完成85），因为PLT并不总是与用户感知的性能一致，例如它包含了永远不会显示的折叠线以下内容的加载。<sup>[13](https://www.irtf.org/anrw/2019/anrw2019-final25-acmpaginated.pdf)</sup>

与原生应用相比，权衡是双向的。2023年一项针对Android上10个互联网内容平台的研究发现，原生应用消耗的能量显著少于对应的网页应用，效应量大，且网页应用使用更多CPU和内存，差异同样具有统计显著性且效应量大。<sup>[17](https://conf.researchr.org/details/mobilesoft-2023/mobilesoft-2023-research-track/7/Native-vs-Web-Apps-Comparing-the-Energy-Consumption-and-Performance-of-Android-Apps-)</sup> 然而一项对热门提供商328项服务的测量研究发现，在请求数、响应时间、数据消耗和能耗等指标上，网页应用在超过31%的情况下优于原生应用。<sup>[18](https://doi.org/10.1109/tmc.2017.2756633)</sup>

## 近期发展

**INP取代FID。** 2024年3月12日，INP正式取代FID成为[核心网页指标](https://www.edgepedia.org/zh/core-web-vitals)，PageSpeed Insights的核心网页指标评估改为评估INP而非FID。<sup>[5](https://web.dev/blog/inp-cwv-launch)</sup> 原因是INP比FID更能反映网站响应性：INP测量用户经历的所有交互的完整延迟，而FID只测量首次交互的输入延迟。<sup>[15](https://arxiv.org/pdf/2412.07892)</sup><sup> • </sup><sup>[6](https://almanac.httparchive.org/en/2024/performance)</sup> Chrome已弃用FID支持，给开发者到2024年9月9日的时间过渡到INP。<sup>[5](https://web.dev/blog/inp-cwv-launch)</sup>

**研究重点。** 一项2010至2024年的系统综述发现，加载时间、页面大小和响应时间等传统指标出现在70%以上的研究中，而与Google Lighthouse和核心网页指标一致的现代以用户为中心的指标，如[可交互时间](https://www.edgepedia.org/zh/time-to-interactive)、最大内容绘制和速度指数，在近期出版物中越来越突出。<sup>[19](https://www.mdpi.com/2073-431X/14/10/446)</sup>

**2026年实测趋势。** 2026年8月的CrUX发布显示，INP良好的源站占比为85.3%，低于7月的85.7%，LCP良好占比从68.3%降至68.1%，三项核心网页指标全部达标的源站占比为55.6%。<sup>[20](https://csswizardry.com/2026/09/web-perf-wednesday-008-good-inp-rates-keep-falling/)</sup> 已发布的INP良好数据从2026年3月的87.2%逐月下降至2026年8月的85.3%，Chrome的发布说明称这一下降令人担忧，但未给出确定原因。<sup>[20](https://csswizardry.com/2026/09/web-perf-wednesday-008-good-inp-rates-keep-falling/)</sup> 该次发布中三项全部达标的55.6%略高于WS2025调查引用的54.4%，因此这里按各自发布的数据报告，而非进行调和。<sup>[8](https://courses.isds.tugraz.at/iaweb/surveys/ws2025/iaweb-ws2025-g2-survey-web-perf.pdf)</sup><sup> • </sup><sup>[20](https://csswizardry.com/2026/09/web-perf-wednesday-008-good-inp-rates-keep-falling/)</sup>

## References

1. [Web performance, MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/Performance)
2. [Web performance, MDN Web Docs Glossary](https://developer.mozilla.org/en-US/docs/Glossary/Web_performance)
3. [Web Performance Working Group Charter, W3C (November 2023)](https://www.w3.org/2023/11/webperf-charter-2023.html)
4. [Web Vitals, web.dev](https://web.dev/articles/vitals)
5. [Interaction to Next Paint is officially a Core Web Vital, web.dev](https://web.dev/blog/inp-cwv-launch)
6. [Performance, Web Almanac 2024, HTTP Archive](https://almanac.httparchive.org/en/2024/performance)
7. [Page Weight, Web Almanac 2024, HTTP Archive](https://almanac.httparchive.org/en/2024/page-weight)
8. [Web Performance Optimisation, TU Graz course survey, WS2025](https://courses.isds.tugraz.at/iaweb/surveys/ws2025/iaweb-ws2025-g2-survey-web-perf.pdf)
9. [What-If Analysis of Page Load Time in Web Browsers Using Causal Profiling, ACM](https://dl.acm.org/doi/pdf/10.1145/3309697.3331483)
10. [Reducing Internet Latency: A Survey of Techniques and Their Merits, IEEE Communications Surveys & Tutorials](https://dl.acm.org/doi/10.1109/COMST.2014.2375213)
11. [Navigation Timing Level 2, W3C Recommendation](https://www.w3.org/TR/navigation-timing-2/)
12. [Uncovering the Key Factors Measuring Web Performance, Springer](https://link.springer.com/chapter/10.1007/978-3-032-00441-3_42)
13. [A Performance Perspective on Web Optimized Protocol Stacks: TCP+TLS+HTTP/2 vs. QUIC, ACM/IRTF ANRW](https://www.irtf.org/anrw/2019/anrw2019-final25-acmpaginated.pdf)
14. [Demystifying Page Load Performance with WProf, USENIX NSDI 2013](https://www.usenix.org/system/files/conference/nsdi13/nsdi13-final177.pdf)
15. [Overview of Web Application Performance Optimization Techniques, arXiv](https://arxiv.org/pdf/2412.07892)
16. [Survey of research on Quality of Experience modelling for web browsing, Springer](https://link.springer.com/article/10.1007/s41233-017-0009-2)
17. [Native vs Web Apps: Comparing the Energy Consumption and Performance of Android Apps, MOBILESoft 2023](https://conf.researchr.org/details/mobilesoft-2023/mobilesoft-2023-research-track/7/Native-vs-Web-Apps-Comparing-the-Energy-Consumption-and-Performance-of-Android-Apps-)
18. [A Tale of Two Fashions: An Empirical Study on the Performance of Native Apps and Web Apps on Android](https://doi.org/10.1109/tmc.2017.2756633)
19. [Predicting Website Performance: A Systematic Review of Metrics, Methods, and Research Gaps (2010–2024), MDPI Computers](https://www.mdpi.com/2073-431X/14/10/446)
20. [Web-Perf Wednesday 008 – Good INP Rates Keep Falling, csswizardry.com](https://csswizardry.com/2026/09/web-perf-wednesday-008-good-inp-rates-keep-falling/)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › HTTP and web communication protocols

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/web-performance

English original: https://www.edgepedia.org/web-performance
