What Is Time to First Byte?

Published
14 min read

Time to First Byte measures when a response begins. Learn rough thresholds, network and server causes, caching decisions and audit steps.

What Is Time to First Byte?

Time to First Byte, or TTFB, measures the time from the start of a navigation request until the browser receives the first byte of the response. It reflects connection setup, redirects, request travel, server work and response travel.

TTFB is a foundational timing metric because no document content can be parsed before the response begins. It can be measured in a browser, synthetic test or server-adjacent tool, but those tools may start and end the clock differently. Browser navigation timing includes work before the application handles the request, such as DNS lookup, connection establishment and secure negotiation when a reusable connection is unavailable. A fast origin does not guarantee fast field TTFB if visitors are far away or redirect through several hosts. Likewise, a slow TTFB does not identify the cause by itself. The value must be decomposed into network, cache and application phases.

  • Begins at navigation start in browser measurement
  • Ends when the first response byte arrives
  • Can include redirects and connection setup
  • Includes network travel and server processing
  • Differs across cache and connection states
  • Precedes document parsing and later paint metrics
  1. Frame the decision raised by What Is Time to First Byte.
  2. Render the page with its required scripts and resources.
  3. Compare content, links, metadata and canonical signals.
  4. Trace each difference to the responsible template or script.
  5. Apply the fix and repeat both observations.
TTFB fundamentals
QuestionAnswerWhy it matters
What is timed?Navigation to first response byteMeasures response start
What is included?Network, redirects and server workMultiple owners
Which resource?Usually main documentStarts page delivery
Is it render time?NoContent still must parse and paint
Can caches affect it?YesEdge and browser state matter
Does one test prove it?NoLocation and connection vary

TTFB becomes actionable only when the total is separated into the connection, cache and origin work that produced it.

What Is a Good TTFB?

A practical rough guide is 0.8 seconds or less for good TTFB, above 0.8 through 1.8 seconds as needing improvement, and above 1.8 seconds as poor, interpreted in the context of how the page delivers content.

TTFB is not itself a Core Web Vital, so the threshold is diagnostic rather than a universal pass-fail requirement. A server-rendered page can spend slightly longer generating complete HTML and still produce strong visible-content timing. A client-rendered shell may return quickly yet delay meaningful content through bundles and APIs. Segment field observations by device, region, connection reuse, route and cache outcome. The 75th percentile is useful for monitoring the majority experience, but trace slower cohorts when business-important visitors cluster in a distant market. Protect improvements against stale-cache or personalization shortcuts that would make the response faster but wrong.

  • Good rough guide: 0.8 seconds or less
  • Needs improvement: above 0.8 through 1.8 seconds
  • Poor: above 1.8 seconds
  • Interpret alongside content delivery strategy
  • Segment routes, regions and cache states
  • Never trade response truth for a faster number
  1. Frame the decision raised by What Is a Good TTFB.
  2. Render the page with its required scripts and resources.
  3. Compare content, links, metadata and canonical signals.
  4. Trace each difference to the responsible template or script.
  5. Apply the fix and repeat both observations.
TTFB interpretation
RangeMeaningAction
≤ 0.8 sGood rough guideProtect and monitor
> 0.8–1.8 sNeeds improvementDecompose phases
> 1.8 sPoorPrioritize shared bottleneck
Fast shell, slow contentClient dependency issueTrace later rendering
Slow uncached onlyOrigin or generation workReview cache and queries
One region slowDistance or routingReview edge placement

Use the TTFB range as an investigation guide while judging success through accurate content delivery and downstream user outcomes.

How Is TTFB Measured?

Browser TTFB is commonly calculated from navigation start to responseStart, the point immediately after the first response byte arrives; server and command-line tools may measure a narrower interval.

Navigation timing exposes redirect, DNS, connection, secure connection, request and response milestones. Subtracting requestStart from responseStart isolates the request-to-first-byte interval more narrowly, while navigation start includes preceding work. A warm persistent connection can remove DNS and handshake costs that a cold visitor experiences. A service worker or local cache can alter the path. Synthetic tools may report one controlled location, while field data reflects real networks and devices. Document exactly which timestamp pair a dashboard uses before comparing systems. Also capture server timing or trace identifiers where possible so browser outcomes can be reconciled with edge and origin logs.

  1. Choose the measurement scope and timestamp pair.
  2. Record redirects before the final request.
  3. Separate DNS, connection and secure negotiation.
  4. Measure requestStart to responseStart.
  5. Label cold, warm and cache-hit states.
  6. Segment synthetic and field observations.
  7. Join browser timing with edge and origin evidence.
  • Evidence for How Is TTFB Measured: the raw html returned by the server
  • The rendered DOM after required scripts run
  • Content, links and metadata that differ between those states
  • Network, console and hydration failures tied to the page
  • A repeatable test at the exact URL and device context
TTFB timing milestones
MilestoneMeaningDiagnostic value
navigationStartNavigation beginsBroad user timing
redirectEndRedirect sequence endsRedirect cost
domainLookupEndDNS resolution endsResolver cost
connectEndConnection readyTransport cost
requestStartRequest beginsNarrow server/network start
responseStartFirst byte receivedTTFB endpoint

Reliable TTFB comparison requires the same timing definition, connection state and route context in every dataset.

What Causes Slow TTFB?

Slow TTFB can come from redirects, DNS and connection setup, geographic distance, edge misses, overloaded origins, slow database queries, synchronous external calls, expensive rendering and cache rules that bypass reusable responses.

The browser sees only the combined outcome, so use layered evidence. Multiple canonical redirects add round trips before the final route begins. A visitor far from the origin pays transport latency. A CDN may forward every request because cookies or cache headers make the response uncacheable. The application can wait on database locks, broad queries, template work or a third-party API. Cold serverless or container startup can affect infrequent routes. Traffic spikes reveal constrained worker pools or connection limits. Personalization can make caching difficult, but public and private output should be separated rather than giving up on all caching. Group findings by route and cache state to avoid blaming infrastructure for one slow query.

  • Redirect chains before the final document
  • Slow DNS, connection or secure negotiation
  • Long distance between visitor and serving edge
  • Cache misses or bypassed public responses
  • Database queries, locks or connection pressure
  • Synchronous third-party dependencies
  • Cold startup or constrained application workers
  1. Frame the decision raised by What Causes Slow TTFB.
  2. Render the page with its required scripts and resources.
  3. Compare content, links, metadata and canonical signals.
  4. Trace each difference to the responsible template or script.
  5. Apply the fix and repeat both observations.
Slow TTFB causes
LayerCauseEvidence
RoutingRedirect chainNavigation trace
NetworkDistance or handshakeRegional connection timing
EdgeMiss or bypassCache-status header
OriginWorker or CPU pressureServer telemetry
DatabaseSlow query or lockQuery trace
DependencyExternal API waitDistributed trace

The correct TTFB fix belongs to the slowest proven layer, not whichever team happens to own the visible page.

How Do Caching and CDNs Improve TTFB?

Caching and CDNs improve TTFB by serving reusable responses closer to visitors and avoiding repeated origin computation, but cache keys, freshness, invalidation and personalization boundaries must remain accurate.

Public pages with identical output can often use shared edge caching. The cache key must include every dimension that legitimately changes the response, such as locale when routes share a host. It should not include arbitrary tracking parameters or cookies that fragment identical content. Authenticated and personalized pages require private handling so one user’s content never appears in another response. Event-based invalidation can keep product and article changes timely without forcing every request to render at the origin. Stale-while-revalidate patterns may preserve availability when the content policy permits. Inspect actual hit, miss and bypass headers rather than assuming a CDN hostname means the page is cached.

  • Separate public and personalized output
  • Normalize cache keys to real content identity
  • Include locale and required variants
  • Exclude irrelevant tracking dimensions
  • Define freshness and event invalidation
  • Measure edge hit, miss and bypass behavior
  1. Frame the decision raised by How Do Caching and CDNs Improve TTFB.
  2. Render the page with its required scripts and resources.
  3. Compare content, links, metadata and canonical signals.
  4. Trace each difference to the responsible template or script.
  5. Apply the fix and repeat both observations.
Cache strategy checks
DecisionGood behaviorRisk
Public responseShared edge reuseStale content
Personalized routePrivate isolationUser-data leak
Cache keyOnly output-changing dimensionsFragmentation
InvalidationTimely content updatesPersistent old page
Miss handlingBounded origin workTraffic stampede
ObservabilityHit status visibleFalse cache assumptions

Caching improves TTFB only when the faster response remains the correct response for the requested route, locale and user state.

How Do Server Rendering and Databases Affect TTFB?

Server rendering and database work affect TTFB because the origin may wait for queries, permissions, templates and upstream services before it can begin the response. Efficient work and streaming boundaries can reduce that delay.

A route should fetch only the data needed for its initial truthful output. Broad queries, N+1 access patterns and serialized calls increase generation time. Index and query changes require real-plan evidence rather than guesswork. Cache stable fragments or complete public responses when policy allows. Server-side rendering can deliver complete HTML, but expensive components should not block the entire document when they can load after the core response without hiding page meaning. Streaming can start bytes earlier, yet a fast first byte followed by a long stalled body may not improve useful display. Trace time to headers, first byte, last byte and meaningful content together.

  • Fetch only data required for initial content
  • Remove repeated and serialized query patterns
  • Bound external dependency timeouts
  • Cache stable public fragments or pages
  • Stream only when useful content can progress
  • Measure complete response and paint outcomes
  1. Frame the decision raised by How Do Server Rendering and Databases Affect TTFB.
  2. Render the page with its required scripts and resources.
  3. Compare content, links, metadata and canonical signals.
  4. Trace each difference to the responsible template or script.
  5. Apply the fix and repeat both observations.
Origin response diagnostics
FindingFix directionTruth check
N+1 queriesBatch or prefetch dataSame complete content
Slow database planIndex or rewrite with evidenceCorrect result set
External waitTimeout or decoupleHonest fallback
Heavy templateSimplify shared renderAll fields present
Cold startupWarm or right-size serviceCost and reliability
Early empty streamMove useful markup earlierDownstream LCP

Origin optimization is successful when it starts an accurate useful response sooner, not when it emits an empty byte merely to improve one timestamp.

How Do You Improve Time to First Byte?

Improve TTFB by removing redirect hops, shortening network distance, increasing correct cache hits, reducing origin and database work, bounding external dependencies and matching capacity to real traffic.

Start with phase evidence and route segmentation. Fix a two-hop canonical redirect before tuning application code that has not started yet. If edge misses dominate, repair cache identity and invalidation. If origin time dominates, trace requests through database, templates and external services. Separate public responses from personalized paths so safe content can be reused. Monitor tail latency and error behavior under load; an optimization that collapses during traffic spikes is not complete. Then verify downstream Largest Contentful Paint, because lower TTFB should translate into earlier useful content rather than a faster shell followed by client delay.

  1. Segment TTFB by route, region and cache state.
  2. Remove avoidable redirects.
  3. Serve public content from an appropriate edge.
  4. Repair cache keys and invalidation.
  5. Trace and reduce origin processing.
  6. Optimize database and dependency waits.
  7. Test representative load and failure states.
  8. Verify downstream content timing.
  • Evidence for How Do You Improve Time to First Byte: the raw html returned by the server
  • The rendered DOM after required scripts run
  • Content, links and metadata that differ between those states
  • Network, console and hydration failures tied to the page
  • A repeatable test at the exact URL and device context
TTFB fix map
FindingCandidate fixVerification
Redirect delayOne canonical hopAll entry variants
Regional latencyEdge placementTarget-market field data
Cache bypassKey and header correctionContent identity
Slow originProfile shared workResponse accuracy
Database delayQuery-plan improvementCorrect data
Dependency waitTimeout or decoupleHonest fallback

The strongest TTFB improvement removes the largest proven delay while preserving response status, content freshness and user isolation.

How Do You Audit TTFB?

Audit TTFB by combining field distributions with regional synthetic traces, decomposing redirects and connection phases, reading cache status and joining edge timing to origin, database and dependency evidence.

Begin with the 75th percentile by target region, route family and device population. Select canonical, redirected, cached, uncached, personalized and recently updated URLs. Capture navigation timing, headers, protocol, connection reuse and response bytes. Repeat tests because cache and connection state materially change results. Use request IDs or tracing to follow slow samples through edge, application and database layers. Compare time to first byte with response completion and rendered content. Pair the audit with render-blocking resource and client-rendering evidence when downstream page display remains slow.

  1. Segment field TTFB by region and route.
  2. Select redirect, hit, miss and private examples.
  3. Capture navigation and connection milestones.
  4. Inspect cache and response headers.
  5. Trace edge, origin, query and dependency time.
  6. Repeat cold and warm measurements.
  7. Compare first byte with useful content timing.
  8. Monitor production after each fix.
  • Evidence for How Do You Audit TTFB: the raw html returned by the server
  • The rendered DOM after required scripts run
  • Content, links and metadata that differ between those states
  • Network, console and hydration failures tied to the page
  • A repeatable test at the exact URL and device context
TTFB audit worksheet
CheckEvidencePass condition
PopulationRegional percentilesAffected cohort known
RedirectsNavigation traceMinimal canonical hops
ConnectionDNS and TLS timingNo avoidable setup
CacheHit-status evidenceCorrect reuse
OriginServer traceBounded processing
DatabaseQuery telemetryNo dominant wait
DependenciesDistributed traceResilient path
OutcomeLCP and response timingUseful improvement

Start with a relevant free SEO check, continue the evidence workflow in Novaverb, and review pricing when comparing continuous monitoring with a one-time manual review.

A complete TTFB audit links a real-user response delay to one network, cache or origin phase and verifies the downstream effect on useful content.