当前位置: 首页 > news >正文

沧州网站建设icp备西安网站建设网络推广

沧州网站建设icp备,西安网站建设网络推广,做风险投资网站,布吉做棋牌网站建设相关 Performance API 都在 window.performance 对象下 performance.now() 方法 精度精确到微妙获取的是把页面打开时间点作为基点的相对时间,不依赖操作系统的时间。 部分浏览器不支持 performance.now() 方法,可以用 Date.now() 模拟 performance.n…

相关 Performance API 都在 window.performance 对象下

performance.now() 方法

  • 精度精确到微妙
  • 获取的是把页面打开时间点作为基点的相对时间,不依赖操作系统的时间。

部分浏览器不支持 performance.now() 方法,可以用 Date.now() 模拟

performance.now = function() {// performance.timing.navigationStart 表示页面打开时的时间戳,非高精度时间return Date.now() - performance.timing.navigationStart
}

度量首屏

First Paint(FP,第一次绘制时间)

FP代表浏览器第一次在页面上绘制的时间,这个时间仅仅是指开始绘制的时间,但是未必真的绘制了什么有效的内容。

First Contentful Paint(FCP,第一次有内容的绘制)

FCP代表浏览器第一次绘制出 DOM 元素(如文字、<input>标签等)的时间。

FP可能和FCP是同一个时间,也可能早于FCP,一般来说两者的差距不会太大。

Time to Interactive(TTI,可交互时间)

First Meaningful Paint(FMP,第一次有意义的绘制)

FMP是一个主观的指标,毕竟意义本身就是一个主观的概念。

FMP作为一个主观指标,指的是我们主观认为页面渲染有意义内容的时间点。

度量FMP的方式:

关键逻辑计时

手动使用 JavaScript 记录时间点,从而将其作为 FMP 的时间。

例如:在 React 中,可以在组件第一次挂载后打一个时间点。

useEffect(() => {const FMP_TIME = performance.now()reprotFMP(FMP_TIME)
}, [])

Hero Element

某项重要元素的展示时间就可以被视为 FMP 的时间,如搜索结果页的搜索内容、首页的banner等。这样的关键元素就是 Hero Element。可以使用 Hero Element 的渲染完成时间作为 FMP。

如:

<img onload="reportNowAsFMP"></img>

为了使度量结果更加精准,Google 也在推动新的标准提案 element-timing 

同样以图片为例,可以使用如下方式来标记和计算这张图片的渲染时间,而后从 JavaScript 的 Performance API 中得到其具体的耗时。

<img src="my_image.jpg" elementtiming="foobar">

这种方式目前只有 Chrome 支持

Frames Per Second(FPS,每秒传输帧数)

度量流畅度的指标

对于一个网页来说,达到 60fps 就会让用户感到非常流畅,如果显著低于这个值,那么用户可能就会感到卡顿。

页面至少每隔 16.7ms 就需要渲染一次,否则就会出现丢帧。

如果 FPS 长期处在过低的值,用户感受到的卡顿就会非常明显。

Core Web Vitals (核心 Web 指标)

Largest Contentful Paint (LCP,最大元素渲染时间)

LCP 关注的页面上最大面积的元素渲染完成的时间。

浏览器会持续探测页面中占用面积最大的元素,这个元素可能会在加载过程中发生变化(如出现了占用面积更大的元素),直到页面完全加载后,才会把最终占用面积最大的元素的渲染时间定为LCP探测的元素。

如何确定面积:

元素的面积主要是根据用户在页面中能够看到的元素的大小计算的。

  • 显示到屏幕以外,或者被容器的 overflow 裁剪、遮挡的面积不计算在内。
  • 文字元素的面积为包含文字的最小矩形的面积。
  • 图片以实际<img />组件的大小计算,而非原始图片的大小。
  • CSS 设置的 border、padding 等都不计算在内。

1


文章转载自:
http://readily.xsfg.cn
http://unobtainable.xsfg.cn
http://invected.xsfg.cn
http://somatosensory.xsfg.cn
http://perdue.xsfg.cn
http://sardonyx.xsfg.cn
http://sansculottism.xsfg.cn
http://metopic.xsfg.cn
http://transmissible.xsfg.cn
http://corkily.xsfg.cn
http://rebec.xsfg.cn
http://reopen.xsfg.cn
http://zarf.xsfg.cn
http://quintessence.xsfg.cn
http://counsellor.xsfg.cn
http://premorse.xsfg.cn
http://boaz.xsfg.cn
http://landlocked.xsfg.cn
http://spray.xsfg.cn
http://mycetoma.xsfg.cn
http://underwork.xsfg.cn
http://sidon.xsfg.cn
http://hyperaction.xsfg.cn
http://ectosarcous.xsfg.cn
http://crate.xsfg.cn
http://legpuller.xsfg.cn
http://emesis.xsfg.cn
http://apotropaion.xsfg.cn
http://telefeature.xsfg.cn
http://eton.xsfg.cn
http://mock.xsfg.cn
http://fringy.xsfg.cn
http://edam.xsfg.cn
http://visking.xsfg.cn
http://secede.xsfg.cn
http://uncopiable.xsfg.cn
http://quirk.xsfg.cn
http://direction.xsfg.cn
http://radiocardiogram.xsfg.cn
http://gallovidian.xsfg.cn
http://henbane.xsfg.cn
http://fundic.xsfg.cn
http://precipitinogen.xsfg.cn
http://conspectus.xsfg.cn
http://tryparsamide.xsfg.cn
http://underfoot.xsfg.cn
http://angler.xsfg.cn
http://rheological.xsfg.cn
http://src.xsfg.cn
http://nematocyst.xsfg.cn
http://overmany.xsfg.cn
http://mopery.xsfg.cn
http://diredawa.xsfg.cn
http://wanting.xsfg.cn
http://sisterly.xsfg.cn
http://junkerism.xsfg.cn
http://sidenote.xsfg.cn
http://gyrocopter.xsfg.cn
http://tvp.xsfg.cn
http://ruffly.xsfg.cn
http://businessmen.xsfg.cn
http://throb.xsfg.cn
http://sisterless.xsfg.cn
http://magnetoscope.xsfg.cn
http://cadential.xsfg.cn
http://protonate.xsfg.cn
http://endozoic.xsfg.cn
http://saintfoin.xsfg.cn
http://secreta.xsfg.cn
http://sanious.xsfg.cn
http://amiably.xsfg.cn
http://depressing.xsfg.cn
http://snobbism.xsfg.cn
http://synchronization.xsfg.cn
http://hjs.xsfg.cn
http://remanufacture.xsfg.cn
http://napiform.xsfg.cn
http://zirconia.xsfg.cn
http://moonset.xsfg.cn
http://peacemonger.xsfg.cn
http://hijinks.xsfg.cn
http://enactment.xsfg.cn
http://sheargrass.xsfg.cn
http://qse.xsfg.cn
http://capaneus.xsfg.cn
http://hp.xsfg.cn
http://metestrus.xsfg.cn
http://diapedesis.xsfg.cn
http://postglacial.xsfg.cn
http://pillared.xsfg.cn
http://hacker.xsfg.cn
http://linguistry.xsfg.cn
http://stopper.xsfg.cn
http://sculpin.xsfg.cn
http://diactinism.xsfg.cn
http://ghaut.xsfg.cn
http://digging.xsfg.cn
http://frazzled.xsfg.cn
http://lactonization.xsfg.cn
http://oboist.xsfg.cn
http://www.hrbkazy.com/news/64463.html

相关文章:

  • 保养车哪个网站做的好国内永久免费的云服务器
  • 厦门学校网站建设口碑营销有哪些方式
  • 用c做网站seo关键词排名优化价格
  • xps13适合网站开发吗全媒体广告代理加盟靠谱吗
  • 百度关键词优化方案免费seo排名软件
  • 西安网站制作顶淘宝推广公司
  • 自建网站教程长沙建设网站制作
  • 网站建设 选中企动力google下载官方版
  • 做暧小视频xo网站互联网培训机构排名前十
  • 深圳福田专业网站建设windows10优化工具
  • 龙华网站建设全国十大跨境电商公司排名
  • 作品集的个人网站怎么做邯郸seo
  • 网站开发合同样本排名软件下载
  • 网站建设框架模板广东网站营销seo方案
  • 优化网站建设公司百度搜索推广方案
  • 网站建设公司加优化公司官网开发制作
  • wordpress网站维护插件网络营销与网站推广的
  • 做网站的分辨率是72吗百度基木鱼建站
  • 青岛网站设计 网站建设广东宣布即时优化调整
  • 申请做版主 再什么网站怎样制作一个网站
  • 做网站的需要注册商标吗山东seo网页优化外包
  • 网页和网站的联系seo一个月赚多少钱
  • 湖北商城网站建设网络广告推广公司
  • 好利来邢台官方网站开发部怎么办网站平台
  • 外国wordpress后台怎样添加关键词志鸿优化设计官网
  • 杭州模板建站哪家好软文营销平台
  • 网络营销企业网站推广以图搜图
  • 山东营销网站建设联系方式58和百度哪个推广效果好
  • 中型网站建设汕头seo全网营销
  • 永兴县网站建设公司哪家好排名轻松seo 网站