Cumulative Layout Shift 是吗?指标停止测量用户交互? Google 关于累积布局转变的指南指出:
Layout shifts that occur in response to user interactions (clicking a link, pressing a button, typing in a search box and similar) are generally fine, as long as the shift occurs close enough to the interaction that the relationship is clear to the user.
最佳答案
请务必记住,累积布局偏移 (CLS) 不仅仅关注页面加载。我们看到的许多最有问题的布局转变发生在页面的初始加载完成之后。当您开始阅读一篇文章或滚动时,由于插入或更新的广告,内容突然发生“变化”。
因此,CLS 会一直累积,直到页面达到卸载。它不会“停止”对用户输入的测量,因为该指标的目标之一是测量真实用户对不稳定页面布局的体验。
您可能想知道这是否意味着长期存在的页面或 session 可能会导致更糟糕的 CLS。 WebPerf 工作组正在思考如何最好地考虑这种细微差别。最终,我们需要标准化衡量指标的方式,例如 session 期间的布局变化。
关于performance-testing - 累积布局偏移是否会停止测量用户交互?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62722217/