Skip to content
Nazmul Nikhil
Menu

Avoid Long Main-Thread Tasks in PageSpeed Insights: Find What Blocks the Page

PageSpeed lists tasks over 50 ms that freeze the page, with the script behind each one. Here's how to read the list and break up or remove those tasks.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Avoid Long Main-Thread Tasks in PageSpeed Insights: Find What Blocks the Page
Photo: Sebastian Schuster on Unsplash

In short

A long task is any main-thread work over 50 ms. While it runs, the page can't respond. This diagnostic lists the longest tasks, with the script URL, start time and duration. Tasks during load drive TBT; tasks later hurt INP. Remove or delay the scripts behind them, or break the work into smaller pieces.

This list explains most of your Total Blocking Time.

Reading the list

  • URL: the script responsible (often a theme bundle, tag manager, or chat widget).

  • Start time: early tasks delay the first interaction; later ones are less critical for the score.

  • Duration: fix the longest first.

Fixes

  1. Remove scripts you don't need.

  2. Delay non-essential scripts until after load or first interaction.

  3. In your own code, split work and yield to the browser (for example with scheduler.yield() where supported, or setTimeout).

Mobile vs desktop

The mobile test slows the CPU, so tasks get much longer, and more of them cross 50 ms.

This guide isn't affiliated with or endorsed by Google.

Sources and references

TAGSPageSpeed InsightsAvoid long main-thread tasksLong tasks javascriptMain thread blocking
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Core Web Vitals

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Page Speed & Core Web Vitals posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com