Using a stripped AIReport (<50KB) from PageSpeed Exporter, your AI coding agent can immediately tell whether slow LCP starts at the server (fixLocation: "server-cdn") and write the exact caching, CDN, or database fix.
TTFB Thresholds and Downstream Impact
| TTFB Range | Rating | Typical Cause | Impact on LCP & FCP |
|---|
| 200–800 ms | Good | Fast origin SSR or warm regional cache | Passes Google guidance |
| 800–1,800 ms | Needs Improvement | Uncached SSR, slow DB queries, redirect chain | Makes ≤ 2.5 s mobile LCP hard |
| > 1,800 ms | Poor | Cold origin, heavy CMS plugins, distant server | Almost guarantees failing LCP |
Step 1: Confirm TTFB in Your AIReport
Run a live mobile audit at speedexporter.com (or call analyze_url via our MCP server) and inspect three places in the <50KB AIReport:
resourceSummary.serverResponseTime: Your exact document TTFB in milliseconds.issues[]→server-response-time&redirects: Shows whether the origin itself is slow or whether redirect hops (http→https→www→ apex) are burning 300–600 ms before the document even starts.- LCP subparts (
details.itemswithlabel/durationMs): Breaks LCP into TTFB, resource load delay, resource load duration, and element render delay. If TTFB is the largest slice, optimizing images first will not get you to 2.5 s.
Step 2: Prompt Your AI Agent with Server Context
Attach the AIReport to Claude, Cursor, or ChatGPT:
The attached JSON is a stripped PageSpeed Exporter AIReport for [URL].
1. Read resourceSummary.serverResponseTime, scorePlan, and the LCP subpart breakdown.
2. Tell me what percentage of LCP is spent waiting on TTFB or redirects.
3. Based on my stack ([Next.js on Vercel / WordPress on Kinsta / Shopify / Express + Postgres]), give me the exact config, caching header, or code change to cut TTFB below 400 ms.
4. Call out any dynamic auth/cookie checks or uncached queries that may be forcing dynamic rendering on public pages.
Highest-Leverage TTFB Fixes by Stack
Next.js (App Router)
- Avoid accidental dynamic rendering: Calling
cookies(),headers(), or uncachedfetch(..., { cache: 'no-store' })in a root layout forces every page request to wait on origin SSR. Keep public marketing and blog routes statically generated (○) or cached with ISR (export const revalidate = 3600). - Parallelize data fetches: Replace sequential
awaitwaterfalls withPromise.all([...]). - Add
Cache-Controlheaders on public API/static endpoints: Usepublic, s-maxage=3600, stale-while-revalidate=86400where safe. - See our Next.js performance optimization guide and Next.js platform page.
WordPress
- Enable full-page caching: Without page caching, PHP + MySQL rebuild every HTML response from scratch. Install WP Rocket, FlyingPress, or server-level Nginx FastCGI cache.
- Add a CDN with edge HTML caching: Cloudflare APO or a managed host's edge cache serves HTML within 50–150 ms globally.
- Enable persistent object caching (Redis): Speeds up uncached WooCommerce/logged-in database queries.
- See our WordPress Core Web Vitals 2026 guide and WordPress platform page.
Eliminate Redirect Chains (All Stacks)
Check meta.url vs meta.finalUrl in the AIReport. Every redirect hop adds a full network round trip on Slow 4G mobile (200–400 ms each). Ensure all internal links, sitemaps, and canonicals point directly to the final HTTPS apex/www URL with no trailing-slash bounce.
Step 3: Re-scan to Verify LCP & FCP Dropped
Deploy your caching or SSR change and run a fresh mobile audit in PageSpeed Exporter:
resourceSummary.serverResponseTime.numericValue≤ 800 ms (ideally ≤ 400 ms).largest-contentful-paintandfirst-contentful-paintinscorePlandrop by roughly the same milliseconds you shaved off TTFB.- On Starter (\$9/mo) or Pro (\$29/mo), use the before/after comparison view to verify both mobile and desktop TTFB improvements side by side.
Further Reading
- What is Time to First Byte (TTFB)? — glossary definition and thresholds
- How to Fix Largest Contentful Paint with AI — full LCP subpart loop
- How to Improve First Contentful Paint (FCP) — FCP levers after TTFB
- Next.js Performance Optimization — Server Components, caching, and preloads
- MCP Server Docs — run live TTFB & LCP checks from your editor