To fix Total Blocking Time (TBT) with AI, give the model the scripts that blocked the main thread, not a generic "reduce JavaScript" note. TBT is 30 points of the Lighthouse performance score, the largest weight. On mobile, targetFor90 is 200 ms. A task counts as blocking only for the part that runs longer than 50 ms: a 230 ms task contributes 180 ms of TBT.
TBT is a lab metric. Interaction to Next Paint (INP) is the field metric Google uses for ranking. Cutting the long tasks that TBT names is the usual way a lab report helps INP. The next scan proves the lab number. Real-user INP in fieldData is a 28-day window and will not move in the same run.
This is the AI loop. The glossary page explains the formula. Render-blocking resources are a different problem: they delay first paint. TBT is main-thread work after first paint.
What you are asking the model to change
pointsAtRisk is the metric weight times one minus its score. TBT's weight is 30, so a score near 0 leaves about 30 points on the table, and a mobile TBT of 200 ms leaves about 3. If Largest Contentful Paint or CLS has more points at risk, fix that metric first.
- 200 ms or less on mobile is the lab target. Stop.
- 200 ms to 600 ms needs the top one or two scripts shortened or deferred.
- Above 600 ms is poor. One bundle or one tag manager is usually most of the 30 points.
Desktop targetFor90 is 150 ms, not 200. A "both" report lists each strategy under scorePlan.strategies. Do not treat a passing mobile number as a passing desktop number.
savings.ms on an audit is an estimate. The score moves when total-blocking-time.numericValue moves. Sorting the prompt by wasted milliseconds sends the model after a small library while a long task still owns the main thread.
The rows that name the script
Run the URL on PageSpeed Exporter, mobile first. Download AIReport (JSON) or use Copy Prompt + JSON. Then read only these fields:
scorePlan→total-blocking-time— current value,pointsAtRisk, andtargetFor90bootup-time— scripts with the most CPU time, plus the topmodulesinside a bundleunused-javascript— bytes shipped that never ran,fixLocationbuild-configthird-party-summaryorthird-parties-insight— tags you do not own,fixLocationthird-partymainthread-work-breakdown— script evaluation versus style and layoutpassedAuditIds— leave checks that already score 90 or above
Detail rows are capped at 10. Work the top of the list. Do not ask the model to open the vendor's remote file. A third-party row means defer, facade, or remove the tag in your own HTML or tag manager.
{
"id": "bootup-time",
"affectsMetrics": ["total-blocking-time"],
"fixLocation": "code",
"details": {
"items": [
{
"url": "https://shop.example/assets/app.js",
"totalMs": 640,
"scriptingMs": 580,
"modules": [{ "source": "src/charts/index.js", "wastedBytes": 184320 }]
},
{ "url": "https://widget.example/chat.js", "totalMs": 410, "scriptingMs": 360 }
]
}
}
Two URLs. The chart module is your code. The chat widget is not.
Prompt
You are fixing Total Blocking Time. The JSON is an AIReport from PageSpeed Exporter.
1. Read scorePlan for total-blocking-time. State numericValue, pointsAtRisk, and targetFor90.
2. List the top items from bootup-time, unused-javascript, and third-party-summary.
3. For first-party scripts, write a diff that code-splits or defers the module named in details.
Use the URL and source path. Do not rewrite unrelated components.
4. For third-party items, defer or remove the tag in this project. Do not edit the vendor's remote file.
5. Skip ids in passedAuditIds. Do not sort by savings.ms.
6. Ignore inp-breakdown-insight for the lab score. It is field-only.
7. Stack: [Next.js / WordPress / Shopify / plain HTML].
8. Tell me the TBT numericValue to expect on the next mobile scan.
Stop when mobile total-blocking-time is at or under targetFor90.
Send the model back to the URL list if it answers with a sitewide "minify JavaScript" plan. Minify is already assumed. The assignment is the long task.
What the diff should look like
For the excerpt above, the chart bundle should load only on the page that renders a chart, and the chat tag should wait until the page is idle.
On Next.js, that is a dynamic import and a lazy script:
const SalesChart = dynamic(() => import("@/components/SalesChart"), { ssr: false });
<Script src="https://widget.example/chat.js" strategy="lazyOnload" />
On WordPress, dequeue the plugin script on templates that do not use it, and load the chat plugin's footer script with defer or after window load. A tag manager with ten tags often owns the TBT by itself. Pause the tags that are not required for the first interaction, then re-scan, instead of installing another performance plugin on a guess.
On Shopify, the same rows are usually an app embed and a theme asset. Disable the app embed on templates that do not need it. Do not try to edit a file hosted on a Shopify or app CDN.
Example re-scan: TBT 1,240 ms → 180 ms. The 580 ms chart evaluation is gone frombootup-time, and the chat script no longer runs before the page is idle. pointsAtRisk for TBT drops from the high twenties to about 3, because 180 ms is under the 200 ms mobile target. The performance score moves by the TBT weight you recovered. That number is in scorePlan. Lab scores still vary by about ±5 points, so one improved run is a signal, not a guarantee.
Prove it, then decide if you need more scans
Run the same mobile URL again.
total-blocking-time.numericValue≤ 200 means the lab check passed- The old script URL is gone from the top of
bootup-time, or itsscriptingtime is a fraction of the previous run - A new URL at the top means the fix exposed a different long task. Paste the new AIReport and repeat once
fieldDataINP will not match the new TBT on the same day. Use it to see whether users were already slow, not to grade this diff
Anonymous use is 2 preview reports in 30 days. A free account is 5 mobile reports a month, shared with the MCP server. A homepage, a template, and a verification scan is most of that allowance. Starter is 50 reports, desktop as well as mobile. Pro is 200. Desktop TBT uses the 150 ms target, so a mobile-only pass can still leave desktop points on the table.
After a free account has used all 5 reports in the month, the first paid month is $5 on Starter (then $9) or $15 on Pro (then $29). Until then, the prices on the pricing page stay $9 and $29.
Further Reading
- What is Total Blocking Time? — long tasks and the 50 ms rule
- What is Interaction to Next Paint? — the field metric TBT is standing in for
- How to Fix Render-Blocking Resources — CSS and JS that delay first paint
- How to Fix Largest Contentful Paint with AI — the same score-plan loop for LCP
- Cursor — run the audit from the editor
- Pricing — 5 free reports, then Starter and Pro