|
By tasks that take more than 50 milliseconds to complete. Goal : less than 300ms Available resources : Lab data Why is the FID score low? const jsHeavy = true; While (jsHeavy) { console.log(“FID fail”) } Heavy JavaScript. That's all. The reason for the low FID score is the JS monopolizing the main thread. That means waiting for user interaction. What elements on the page affect FID? FID is a way to measure main thread activity. Tasks ongoing on the main thread must be completed before elements on the page can respond to user interaction. Here are some common reasons why users are tapping in frustration. text field Checkbox Radio button (<input>, <textarea>) Selective dropdown (<select>) Link (<a>) Reference : Check page 3 of Crux Dashboard v2 First Input Delay (FID) to see if this is an issue for your users . Also, use Chrome DevTools to identify specific tasks.
How to check TBT using Chrome's DevTools Access the page in Chrome Open the Network panel in Dev Tools (Command + Option + I on Mac, Control + Shift + I on Windows and Linux) Check the box for "disable cache" Go to Performance Panel and check the box for "Web Vitals" Click the reload button and start tracing Belgium Phone Number Data Look for the blue block that says "Long Tasks". Or look for the red mark in the right corner of the task. These represent tasks that take more than 50 milliseconds. Check TBT at the bottom of the summary How to improve FID with low score Stop loading large amounts of third-party scripts Third-party code results in slower performance. The simplicity and performance of third-party scripts will affect the performance of your website.
Free up the main thread by splitting long tasks 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 these huge bundles into smaller chunks and distributing only the functionality that will be used, you can free up the main thread. Check your tag manager Expanding the tag fires the event listener associated with the main thread. Tag managers can be long-running input handlers that block scrolling. Work with the development team to debounce input handlers . Page optimization for interaction Distribute and run JS bundles in order of importance. In the case of above the fold, it is displayed preferentially. Let's use rel=preload. If it's important but not rendering-blocking, use the additional async attribute.
|
|