Discuz! Board

 找回密碼
 立即註冊
搜索
熱搜: 活動 交友 discuz
查看: 15|回復: 0

In the case of below-the-fold, use the defer attribute to delay it

[複製鏈接]

1

主題

1

帖子

5

積分

二次元新人

Rank: 1

積分
5
發表於 2024-3-5 15:17:22 | 顯示全部樓層 |閱讀模式
Utilizing web workers A web worker allows JavaScript to run in the background and not on the main thread where FID is measured. Reduce JavaScript execution time If you're distributing a huge JS bundle to every page, it's likely that it contains functionality that isn't used on that page. Each JS feature is downloaded, parsed, compiled, and executed even though it is not being used. By splitting such a huge bundle into smaller chunks ( code splitting ) and distributing only the functions that are used ( tree shaking ), you can free up the main thread. Cumulative Layout Shift What : Visual stability measurements : Calculated based on the number of frames the element has visually moved and the total number of pixels the element has moved Layout shift score = total number of influences × total number of distances Key Actions: CLS is the only metric in Core Web Vitals that is not measured by time. The exact calculation method is under consideration .

Goal : 75% of page loads are above the CLS metric of 0.10 Available resources: lab data and field data Diagnosing the reason for low CLS scores Reference material : Check the 4th page of Crux Dashboard v2 – Cumulative Layout Shift (CLS) to confirm the problem for the user . Also, use Lighthouse Belgium Phone Number Data to identify the causative factors. By using Chrome DevTools, you can get detailed information such as the position of the relevant element and the number of times the element moves. How to check CLS using Chrome's DevTools Access the  page in Chrome Go to the Network panel in Dev Tools (Command + Option + I on Mac, Control + Shift + I on Windows and Linux) Check the "disable cache" button Go to the Performance panel and check the button for “Web Vitals” Click the reload button and start tracing Click the red mark in the "Experience" section See the names of nodes, which nodes are highlighted on the page, where elements are moved, etc. What is CLS evaluated for? Elements displayed in the initial viewport can be subject to calculations. If the footer content is loaded before the main content and is visible in the viewport, the footer content will be part of the CLS score (in this case, you'll get a terrible score).




What are the factors behind the low CLS score? Cookie announcements may be a factor . Other factors include the following. Images without dimensions Ads, embeds, and iframes without dimensions Dynamically inserted content Web fonts that cause FOIT/FOUT Critical resource chain Actions that update the DOM after network response How to improve CLS Image and video elements always have width and height size attributes. It may not be as simple as writing something like <img src=”stable-layout.jpg” width=”640″ height=”360″ />. In case of responsive web design, height and width declarations are reduced. This also has the negative effect of causing the page to reflow when the image is displayed. A best practice is to utilize user agent style sheets to systematically declare dimensions according to the image aspect ratio. Secure advertising space Since your website is public, you can't argue that third-party ads are having a negative impact on performance.

回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|手機版|自動贊助|二次元奇缘

GMT+8, 2025-2-4 04:02 , Processed in 0.069556 second(s), 21 queries .

抗攻擊 by GameHost X3.4

© 2001-2017 Comsenz Inc.

快速回復 返回頂部 返回列表
一粒米 | 中興米 | 論壇美工 | 設計 抗ddos | 天堂私服 | ddos | ddos | 防ddos | 防禦ddos | 防ddos主機 | 天堂美工 | 設計 防ddos主機 | 抗ddos主機 | 抗ddos | 抗ddos主機 | 抗攻擊論壇 | 天堂自動贊助 | 免費論壇 | 天堂私服 | 天堂123 | 台南清潔 | 天堂 | 天堂私服 | 免費論壇申請 | 抗ddos | 虛擬主機 | 實體主機 | vps | 網域註冊 | 抗攻擊遊戲主機 | ddos |