Cumulative Layout Shift 是否停止衡量用户交互? [英] Does Cumulative Layout Shift stop measuring on user-interaction?

查看:85
本文介绍了Cumulative Layout Shift 是否停止衡量用户交互?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cumulative Layout Shift 指标是否停止衡量用户交互?Google 关于累积布局转换的指南说:

Does the Cumulative Layout Shift metric stop measuring on user-interaction? Google's guidance on Cumulative Layout Shift says:

响应用户交互(点击链接、按下按钮、在搜索框中键入等)是一般没问题,只要偏移发生得足够接近关系对用户来说很清楚的交互.

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) 不仅仅关注页面加载.我们看到的许多最有问题的布局转换发生在页面的初始加载完成之后.您可能已经开始阅读文章或在内容突然移动"时滚动.由于已注入或更新的广告.

It's important to remember that Cumulative Layout Shift (CLS) is not just focused on page load. Many of the most problematic layout shifts we see happen after the initial load of a page has completed. You may have started reading an article or scrolled when all of a sudden content "shifts" because of an ad that has been injected or updated.

因此,CLS 会累积,直到页面到达卸载.它不会停止"衡量用户输入,因为该指标的目标之一是衡量真实用户对不稳定页面布局的体验.

So, CLS is accumulated until a page reaches unload. It does not "stop" measuring upon a user input, as one of the goals of the metric is to measure the experience real users have of unstable page layouts.

您可能想知道这是否意味着长期存在的页面或会话可能会导致更糟糕的 CLS.通过 WebPerf 工作组考虑如何最好地考虑这种细微差别.最终,我们需要标准化我们衡量指标的方式,例如在会话期间的布局变化.

You might wonder if this means that long-lived pages or sessions could end up with a worse CLS. There is thought going into how best to factor in this nuance this via the WebPerf Working Group. Ultimately, we need to normalize how we measure metrics like layout shift across the length of a session.

这篇关于Cumulative Layout Shift 是否停止衡量用户交互?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆