How To Improve Total Blocking Time in Wordpress

pattern 21

Pagespeed TBT metric measures the total amount of time that a page is blocked from responding to user input, such as mouse clicks, screen taps, or keyboard presses. It uses the following metrics to determine grades:

TBT time
(in milliseconds)
0–200 msGreen (fast)
200-600 msOrange (moderate)
Over 600 msRed (slow)

The sum is calculated by adding the blocking portion of all long tasks between First Contentful Paint and Time to Interactive. Any task that executes for more than 50 ms is a long task. The amount of time after 50 ms is the blocking portion. For example, if Lighthouse detects a 70 ms long task, the blocking portion would be 20 ms.

If a Wordpress plugin is causing the TBT, consider a plugin that has better and optimized code, or disable features to limit render-blocking tasks. If your Wordpress core files are causing TBT, reduce the number of blocking tasks.

You could use techniques such as delaying javascript until user interaction and others, but this would only fool Pagessped and the issue, as it just postpones the loading of potentially large tasks.

The Delay javascript feature was specifically created to trick Pagespeed.

How to Improve TBT running third-party scripts off the main thread in Web Workers

You can run third-party scripts on web workers with Partytown, or Zaraz(Cloudflare Edge). They are improving support for more APIs, making it able to run not just pageviews triggers from analytics tools, but much more popular analytic metrics.

Get your Javascript safely optimized and your pages tested

🚀Boost your website Speed & Performance

*No spams


Inline Feedbacks
View all comments