Time untuk pertama Byte (TTFB)
What TTFB measures, why ini isn't sebuah Core Web Vital, how ini caps Anda LCP dan FCP, what counts sebagai baik, dan cara fix sebuah slow server respons.
Bahasa
Time untuk pertama Byte adalah time dari start dari sebuah permintaan untuk when pertama byte dari respons arrives — sum dari redirect time, service worker startup, DNS lookup, connection dan TLS negotiation, dan permintaan itself. ini adalah not sebuah Core Web Vital; ini adalah sebuah diagnostic, foundational metric dan sebuah major input untuk FCP dan LCP. web.dev says aim untuk ≤0,8 s (baik) dan treats >1,8 s sebagai poor. ini adalah both sebuah field dan lab metric. Lighthouse's 'Reduce server respons times' audit adalah narrower — ini flags server time di atas ~600 ms, not full TTFB, dan sebagai dari Lighthouse 13 lives inside 'Document permintaan latency' insight. Fix ini dengan sebuah CDN, edge/HTML caching, faster hosting, fewer redirects, Early Hints, dan efficient TLS. dan remember: sebuah tinggi TTFB doesn't selalu berarti sebuah slow situs.
TL;DR — Time untuk pertama Byte adalah how panjang browser waits, setelah ini menanyakan untuk sebuah halaman, sebelum very pertama byte dari jawaban comes back. ini adalah sebuah mengukur dari server responsiveness. sebuah baik TTFB adalah 0,8 seconds atau less. ini adalah not sebuah Core Web Vital — tetapi sebuah slow one drags down metrics itu adalah, because nothing pada halaman dapat start until itu pertama byte menampilkan up.
What TTFB adalah
When Anda click sebuah tautan, Anda browser mengirim sebuah permintaan untuk sebuah server dan lalu waits. Time untuk pertama Byte (TTFB) adalah length dari itu wait — dari moment permintaan starts untuk moment pertama byte dari respons begins untuk arrive.
ini isn’t hanya “how fast the server thinks.” (terjemahan) “how fast server thinks.” sebuah lot happens sebelum Anda browser bahkan talks untuk right machine: ini dapat ikuti sebuah redirect, look up domain di DNS, open sebuah connection, dan negotiate secure (TLS) handshake. TTFB rolls semua dari itu together, lalu menambahkan server’s own processing time, dan stops clock di pertama byte back.
Evidence for this claim TTFB measures from request start until the first response byte and includes redirect, connection setup, and server-response time. Scope: Current web.dev navigation TTFB definition. Confidence: high · Verified: web.dev: Time to First ByteWhat counts sebagai baik
Google’s web.dev guidance adalah sederhana: aim untuk sebuah TTFB dari 0,8 seconds atau less. Above 1,8 seconds adalah considered poor. sebagian besar situs seharusnya menjadi able untuk hit baik mark — dan banyak don’t, which adalah exactly why ini adalah worth memeriksa.
Evidence for this claim web.dev recommends a TTFB of 0.8 seconds or less; above 1.8 seconds is poor at the 75th percentile. Scope: Current web.dev TTFB guidance; TTFB is diagnostic, not a Core Web Vital. Confidence: high · Verified: web.dev: Time to First Bytemengapa ini penting bahkan though ini isn’t sebuah “core” (terjemahan) “core” metric
Anda’ll hear sebuah lot tentang Core Web Vitals — LCP, INP, dan CLS. TTFB adalah not one dari them. tetapi ini sits underneath ones tentang memuat: both pertama Contentful Paint dan Largest Contentful Paint sertakan TTFB di mereka pengukuran. browser dapat’t paint anything until bytes start arriving. So sebuah slow TTFB puts sebuah ceiling pada how fast Anda halaman dapat possibly feel.
practical takeaway: TTFB doesn’t get Anda diperingkatkan oleh itself, tetapi sebuah buruk one quietly holds back metrics itu melakukan.
usual fixes, di plain istilah
- gunakan CDN. ini puts sebuah copy dari Anda situs pada server physically closer untuk Anda pengunjung, so round trip adalah shorter.
- Cache Anda halaman. jika server dapat hand back sebuah ready-dibuat copy alih-alih rebuilding halaman setiap time, pertama byte comes much sooner.
- Get better hosting. sebuah faster server dan database adalah paling direct fix.
- Cut redirects. setiap redirect adalah sebuah extra round trip sebelum nyata halaman bahkan starts memuat.
ingin full versi — exact thresholds, LCP relationship, Lighthouse-vs-CrUX threshold confusion, Early Hints, dan cara mengukur ini? Switch untuk Advanced tab.
TL;DR — TTFB adalah time dari start dari permintaan untuk when pertama byte dari respons arrives — sum dari redirect time, service worker startup, DNS lookup, connection + TLS negotiation, dan permintaan itself, up untuk itu pertama byte. ini adalah not sebuah Core Web Vital; ini adalah sebuah foundational, diagnostic metric itu feeds FCP dan LCP. web.dev: baik adalah ≤0,8 s, poor adalah >1,8 s (75th percentile). ini adalah both sebuah field dan sebuah lab metric. Lighthouse’s “Reduce server response times” (terjemahan) “Reduce server respons times” audit adalah narrower — ini flags server time di atas ~600 ms, not full TTFB, dan sebagai dari Lighthouse 13 ini lives inside “Document request latency” (terjemahan) “Document permintaan latency” insight. Fix ini dengan sebuah CDN, edge/HTML caching, faster hosting, fewer redirects, 103 Early Hints, dan efficient TLS. dan sebuah tinggi TTFB doesn’t selalu berarti sebuah slow situs.
What TTFB actually measures
TTFB measures time antara starting untuk navigate untuk sebuah halaman dan when pertama byte dari respons begins untuk arrive. thing people get wrong adalah treating ini sebagai pure backend processing time. ini isn’t. ini adalah sum dari everything itu memiliki untuk finish sebelum itu pertama byte dapat come back:
- Redirect time
- Service worker startup time (jika one applies)
- DNS lookup
- Connection dan TLS negotiation
- ** permintaan** — up until poin pertama byte dari respons memiliki arrived
server processing adalah di there, tetapi so adalah whole connection-setup tax. itu distinction penting moment Anda start reading alat, because mereka don’t semua mengukur yang sama slice (more pada itu below).
Evidence for this claim TTFB measures from request start until the first response byte and includes redirect, connection setup, and server-response time. Scope: Current web.dev navigation TTFB definition. Confidence: high · Verified: web.dev: Time to First Byteini adalah not sebuah Core Web Vital
I’ll say ini plainly because ini adalah single sebagian besar umum misconception: TTFB adalah not sebuah Core Web Vital. three Core Web Vitals adalah LCP (memuat), INP (interactivity), dan CLS (visual stability). TTFB adalah sebuah foundational, diagnostic metric — Google’s own framing adalah itu ini adalah “a foundational metric for measuring connection setup time and web server responsiveness in both the lab and the field.” (terjemahan) “sebuah foundational metric untuk measuring connection setup time dan server web responsiveness di both lab dan field.”
Google adalah juga explicit itu Anda tidak strictly memiliki untuk hit baik TTFB threshold: because ini isn’t sebuah Core Web Vital, ini adalah “not absolutely necessary that sites meet the ‘good’ TTFB threshold, provided that it doesn’t impede their ability to score well on the metrics that matter.” (terjemahan) “not absolutely necessary itu situs meet ‘baik’ TTFB threshold, disediakan itu ini doesn’t impede mereka ability untuk score well pada metrics itu penting.” itu last clause adalah catch — untuk sebagian besar situs sebuah buruk TTFB absolutely melakukan impede metrics itu penting.
How ini caps FCP dan LCP
TTFB precedes setiap pengguna-centric memuat metric. Both pertama Contentful Paint dan Largest Contentful Paint sertakan TTFB di mereka pengukuran — clock untuk itu metrics adalah sudah running while Anda wait untuk pertama byte. web.dev breaks LCP ke sub-bagian dan TTFB adalah pertama dari them, which adalah why Anda dapat’t memiliki sebuah fast LCP sitting pada top dari sebuah slow TTFB.
ini adalah juga where dunia nyata data gets pointed. HTTP Archive’s Web Almanac ditemukan itu pada situs dengan poor LCP, TTFB alone adalah eating roughly 2,27 seconds — nearly entire 2,5-kedua “good LCP” (terjemahan) “baik LCP” budget — sebelum apa pun image atau text bahkan started untuk render. jika Anda LCP adalah buruk dan Anda pada-halaman konten looks dioptimalkan, TTFB adalah pertama place I’d look.
So peringkat story adalah indirect tetapi nyata: TTFB adalah not sebuah Google sinyal peringkat ( sinyal peringkat adalah LCP, INP, dan CLS — TTFB isn’t named di itu set). tetapi ini adalah baked ke LCP, which adalah sebuah sinyal peringkat. path runs melalui LCP, not melalui TTFB directly.
Thresholds: baik, perlu improvement, poor
web.dev’s guidance, diukur di 75th percentile dari nyata-pengguna memuat:
- baik: ≤ 0,8 s
- Poor: > 1,8 s
“Most sites should strive to have a TTFB of 0.8 seconds or less.” (terjemahan) “sebagian besar situs seharusnya strive untuk memiliki sebuah TTFB dari 0,8 seconds atau less.” Worth knowing history: Google moved “good” (terjemahan) “baik” line dari 500 ms untuk 800 ms back di 2022, dan older data adalah recalculated di bawah baru standard — so don’t compare raw historical TTFB angka without memeriksa which threshold mereka digunakan.
600 ms vs 800 ms confusion
ini trips up sebuah lot dari people, so ini adalah worth menjadi precise. ada two berbeda angka floating sekitar:
- CrUX / web.dev TTFB threshold: 800 ms. ini adalah field threshold untuk full TTFB (DNS + connection + TLS + redirects + server time).
- Lighthouse “Reduce server response times” (terjemahan) “Reduce server respons times” audit: ~600 ms. ini adalah sebuah lab audit itu flags when browser waits more daripada tentang 600 ms untuk server untuk respond untuk main document permintaan. Crucially, ini measures server respons time hanya — ini melakukan not sertakan DNS, connection setup, atau TLS.
So Lighthouse angka looks stricter, tetapi ini adalah measuring sebuah narrower slice. sebagai docs put ini, “server response time is only part of the full Time to First Byte (TTFB).” (terjemahan) “server respons time adalah hanya bagian dari full Time untuk pertama Byte (TTFB).” Don’t treat sebuah passing Lighthouse audit sebagai proof dari sebuah baik field TTFB, dan don’t panic itu 600 < 800 berarti thresholds contradict setiap lainnya — mereka mengukur berbeda things.
One versi note: sebagai dari Lighthouse 13, ini audit no longer stands alone — ini adalah telah folded ke broader “Document request latency” (terjemahan) “Document permintaan latency” insight. underlying ~600 ms server-respons periksa adalah yang sama; ini adalah hanya surfaced differently depending pada which Lighthouse versi generated Anda report.
Field dan lab — both
TTFB adalah one dari metrics Anda dapat read di both worlds. di field, ini comes dari CrUX (nyata Chrome pengguna), surfaced di PageSpeed Insights dan Search Console. di lab, Chrome DevTools labels ini “Waiting (TTFB)” (terjemahan) “Waiting (TTFB)” di Network panel waterfall (“the browser is waiting for the first byte of a response” (terjemahan) “ browser adalah waiting untuk pertama byte dari sebuah respons”), dan alat like WebPageTest dan Lighthouse report ini too. One field caveat: di CrUX, TTFB adalah masih treated sebagai somewhat experimental — ini excludes beberapa advanced navigation jenis like prerendered dan back/forward-cache navigations, so field averages dapat read sebuah touch pessimistic relative untuk what pengguna actually feel.
sebuah tinggi TTFB doesn’t selalu berarti sebuah slow situs
Here’s nuance itu threshold angka hide. sebuah server-rendered halaman dapat post sebuah higher TTFB daripada sebuah client-rendered one dan masih deliver better FCP dan LCP — because when itu pertama byte finally arrives, ini adalah complete HTML browser dapat paint immediately, alih-alih sebuah thin shell itu lalu memiliki untuk fetch dan run sebuah JavaScript bundle sebelum anything appears. Google says ini directly: “a server-rendered site that does not require as much client-side work could have a higher TTFB, but better FCP and LCP values than an entirely client-rendered experience.” (terjemahan) “sebuah server-rendered situs itu melakukan not memerlukan sebagai much client-side berfungsi dapat memiliki sebuah higher TTFB, tetapi better FCP dan LCP nilai daripada sebuah entirely client-rendered experience.”
flip side: untuk sebuah client-rendered single-halaman app, TTFB determines when JavaScript bundle bahkan starts memuat, so sebuah rendah TTFB penting more there, not less. Don’t mengoptimalkan TTFB di sebuah vacuum — mengoptimalkan whole memuat chain, dan judge TTFB oleh what ini melakukan untuk FCP dan LCP.
cara meningkatkan TTFB
Roughly di priority order:
- Start dengan hosting. sebuah slow backend atau database kueri adalah sebuah tax pada setiap single permintaan, dan no amount dari front-end berfungsi menghapus ini. ini adalah pertama thing untuk pertimbangkan.
- gunakan CDN. sebuah CDN solves proximity masalah — sebuah distributed network dari edge server caches resources physically closer untuk Anda pengguna, cutting speed-dari-light cost dari connection dan TLS handshake. ini adalah highest-ROI fix untuk sebagian besar situs, because geographic distance dari Anda origin adalah sebuah structural tax nothing pada backend dapat erase. caveat: untuk fully dynamic, personalized konten itu dapat’t menjadi cached, sebuah CDN menambahkan sebuah hop without sebuah cache-hit payoff — there jawaban adalah backend optimization, edge compute, atau streaming.
- Cache Anda HTML, bahkan briefly. bahkan sebuah pendek cache time helps sebuah busy situs noticeably: hanya pertama pengunjung di itu window pays full latency back untuk origin; everyone else gets cached copy.
- Eliminate redirects. Redirects adalah sebuah umum contributor untuk tinggi TTFB — setiap one adalah sebuah round trip sebelum nyata respons starts. Cut ones di bawah Anda control.
- Stream markup untuk browser. browser process markup efficiently when ini adalah streamed di chunks sebagai ini arrives. banyak SSR frameworks mendukung streaming tetapi ini adalah left switched off; turning ini pada dapat drop TTFB pada dynamic halaman dengan no infrastructure perubahan di semua.
- gunakan 103 Early Hints. 103 kode status adalah sebuah preliminary respons server dapat kirim while backend adalah masih preparing markup, hinting untuk browser untuk begin downloading render-critical resources early. ini doesn’t lower TTFB itself — di fact sebuah 103 dapat count sebagai “first byte” (terjemahan) “pertama byte” — tetapi ini shrinks impact dari sebuah tinggi TTFB. Shopify dan Cloudflare memiliki reported several hundred milliseconds dari LCP improvement dari ini, di beberapa cases close untuk sebuah kedua.
- Negotiate TLS efficiently dan mengoptimalkan service worker startup. sebuah service worker itu hasn’t started yet menambahkan -nya startup time untuk TTFB; once running, -nya cache (stale-while-revalidate, atau sebuah app-shell model untuk SPAs) dapat dramatically reduce TTFB.
Where situs actually stand
alasan ini adalah worth Anda attention: ini adalah sebuah stubborn masalah di seluruh web. Web Almanac’s mobile baik-TTFB rate memiliki barely moved di five years — hovering sekitar 41–42% — meaning sebuah majority dari mobile situs masih don’t memiliki sebuah “good” (terjemahan) “baik” TTFB. itu stagnation adalah, frankly, sebuah opportunity. untuk sebuah server-heavy situs failing LCP, TTFB adalah biasanya highest-leverage fix pada board.
ini halaman adalah bagian dari web-performa cluster, which sits di bawah Core Web Vitals. untuk metrics TTFB feeds ke, see Largest Contentful Paint dan pertama Contentful Paint; untuk mengukur ini pada pengguna nyata dan di lab, see CrUX, PageSpeed Insights, dan Lighthouse.
AI summary
sebuah condensed take pada Advanced versi:
- TTFB = wait untuk pertama byte. Time dari start dari permintaan untuk when pertama byte dari respons arrives — sum dari redirect time, service worker startup, DNS lookup, connection + TLS negotiation, dan permintaan itself. Not hanya server processing.
- ini adalah NOT sebuah Core Web Vital. Core Web Vitals adalah LCP, INP, dan CLS. TTFB adalah sebuah foundational, diagnostic metric.
- ini caps FCP dan LCP. Both sertakan TTFB, so sebuah slow TTFB sets sebuah ceiling pada how fast sebuah halaman dapat muat. pada poor-LCP situs, TTFB alone adalah ~2,27 s — nearly whole 2,5 s baik-LCP budget.
- Rankings: indirect. TTFB isn’t sebuah Google sinyal peringkat, tetapi ini adalah baked ke LCP, which adalah. path runs melalui LCP.
- Thresholds (75th pct): baik ≤ 0,8 s, poor > 1,8 s. “good” (terjemahan) “baik” line moved dari 500 ms untuk 800 ms di 2022.
- 600 ms vs 800 ms: Lighthouse’s “Reduce server response times” (terjemahan) “Reduce server respons times” audit flags ~600 ms dari server time hanya — narrower daripada 800 ms full-TTFB field threshold. “Server response time is only part of the full TTFB.” (terjemahan) “server respons time adalah hanya bagian dari full TTFB.” sebagai dari Lighthouse 13 ini audit lives inside “Document request latency” (terjemahan) “Document permintaan latency” insight.
- Field dan lab: CrUX/PSI/Search Console (field); DevTools “Waiting (TTFB)” (terjemahan) “Waiting (TTFB)”, WebPageTest, Lighthouse (lab).
- tinggi TTFB ≠ slow situs: sebuah SSR halaman dapat memiliki sebuah higher TTFB tetapi better FCP/LCP daripada sebuah client-rendered one, because pertama byte adalah complete HTML.
- Fixes (priority): hosting pertama, lalu CDN, HTML caching, fewer redirects, streaming, 103 Early Hints, efficient TLS, service worker startup.
- State dari web: mobile baik-TTFB memiliki telah flat di ~41–42% untuk five years — sebuah nyata opportunity.
Official documentation
Primary-source documentation dari Google’s Chrome dan web.dev teams.
- Time untuk pertama Byte (TTFB) — definition, five components, 0,8 s / 1,8 s thresholds, why ini isn’t sebuah Core Web Vital, dan -nya relationship untuk FCP dan LCP.
- mengoptimalkan TTFB — optimization guide: hosting pertama, lalu CDN, caching, redirects, streaming, 103 Early Hints, dan service workers.
- Reduce server respons times — Lighthouse audit (~600 ms server-time threshold) dan how ini differs dari full TTFB. sebagai dari Lighthouse 13 ini adalah folded ke “Document request latency” (terjemahan) “Document permintaan latency” insight.
- Web Vitals — where TTFB sits di metric taxonomy: sebuah supplementary/diagnostic metric, dengan LCP, INP, dan CLS sebagai Core Web Vitals.
- Largest Contentful Paint (LCP) — confirms LCP mencakup TTFB delays.
- pertama Contentful Paint (FCP) — confirms FCP mencakup TTFB, dan lists “reduce server response times (TTFB)” (terjemahan) “reduce server respons times (TTFB)” sebagai sebuah fix.
- Core Web Vitals (Google Search Central) — peringkat-signal docs name LCP, INP, dan CLS hanya; TTFB adalah not listed.
- 103 Early Hints — early kode respons, browser/server mendukung, dan dunia nyata hasil.
Quotes dari source
pada—record statements dari Google’s web.dev dan Chrome teams. setiap tautan adalah sebuah deep tautan itu jumps untuk quoted passage pada source halaman where one adalah verified.
web.dev — what TTFB adalah
- “TTFB is a metric that measures the time between starting navigating to a page and when the first byte of a response begins to arrive.” (terjemahan) “TTFB adalah sebuah metric itu measures time antara starting navigating untuk sebuah halaman dan when pertama byte dari sebuah respons begins untuk arrive.” Jump untuk quote
- “Time to First Byte (TTFB) is a foundational metric for measuring connection setup time and web server responsiveness in both the lab and the field.” (terjemahan) “Time untuk pertama Byte (TTFB) adalah sebuah foundational metric untuk measuring connection setup time dan server web responsiveness di both lab dan field.” Jump untuk quote
web.dev — thresholds
- “Good TTFB values are 0.8 seconds or less, and poor values are greater than 1.8 seconds.” (terjemahan) “baik TTFB nilai adalah 0,8 seconds atau less, dan poor nilai adalah greater daripada 1,8 seconds.” Jump untuk quote
web.dev — not sebuah Core Web Vital
- “Because TTFB isn’t a Core Web Vitals metric, it’s not absolutely necessary that sites meet the ‘good’ TTFB threshold, provided that it doesn’t impede their ability to score well on the metrics that matter.” (terjemahan) “Because TTFB isn’t sebuah Core Web Vitals metric, ini adalah not absolutely necessary itu situs meet ‘baik’ TTFB threshold, disediakan itu ini doesn’t impede mereka ability untuk score well pada metrics itu penting.” Jump untuk quote
web.dev — relationship untuk FCP dan LCP
- “Because TTFB precedes user-centric metrics such as First Contentful Paint (FCP) and Largest Contentful Paint (LCP)…” (terjemahan) “Because TTFB precedes pengguna-centric metrics such sebagai pertama Contentful Paint (FCP) dan Largest Contentful Paint (LCP)…” Jump untuk quote
- pada sebuah server-rendered situs: “a server-rendered site that does not require as much client-side work could have a higher TTFB, but better FCP and LCP values than an entirely client-rendered experience.” (terjemahan) “sebuah server-rendered situs itu melakukan not memerlukan sebagai much client-side berfungsi dapat memiliki sebuah higher TTFB, tetapi better FCP dan LCP nilai daripada sebuah entirely client-rendered experience.” (web.dev, “Time to First Byte” (terjemahan) “Time untuk pertama Byte”)
Lighthouse — server respons time vs full TTFB
- “Server response time is only part of the full Time to First Byte (TTFB).” (terjemahan) “server respons time adalah hanya bagian dari full Time untuk pertama Byte (TTFB).” (Lighthouse, “Reduce server response times.” (terjemahan) “Reduce server respons times.”)
Patrick Stox — pada TTFB’s status (dari my Ahrefs Core Web Vitals guide)
- “There are additional Web Vitals that serve as proxy measures or supplemental metrics but are not used in the ranking calculations. The Web Vitals metrics for visual load include Time to First Byte (TTFB) and First Contentful Paint (FCP).” (terjemahan) “ada additional Web Vitals itu sajikan sebagai proxy measures atau supplemental metrics tetapi adalah not digunakan di peringkat calculations. Web Vitals metrics untuk visual muat sertakan Time untuk pertama Byte (TTFB) dan pertama Contentful Paint (FCP).” Read guide
#:~:text= deep tautan above adalah verified terhadap live
halaman selama ini brief. server-rendered-situs line dan Lighthouse
“server response time is only part of the full TTFB” (terjemahan) “server respons time adalah hanya bagian dari full TTFB” line adalah reproduced dari
source brief dan seharusnya menjadi confirmed terhadap live halaman sebelum menjadi treated sebagai
akhir. TTFB triage checklist
When PageSpeed Insights, Search Console, atau Lighthouse flags sebuah slow server respons, berfungsi down ini list:
- Confirm what Anda’re looking di — full field TTFB (≤0,8 s baik) atau Lighthouse “Reduce server response times” (terjemahan) “Reduce server respons times” audit (~600 ms, server time hanya). mereka aren’t yang sama angka.
- periksa field, not hanya lab — pull TTFB dari CrUX via PageSpeed Insights atau Search Console Core Web Vitals report, di 75th percentile.
- lihat whether TTFB adalah thing capping Anda LCP — jika LCP adalah poor dan halaman konten adalah dioptimalkan, TTFB adalah pertama suspect.
- Count Anda redirects — eliminate apa pun rantai pengalihan di bawah Anda control pada key entry URLs.
- Confirm sebuah CDN adalah serving Anda pengguna (edge PoPs close untuk Anda audience), dan itu HTML/edge caching adalah actually hitting, not hanya static assets.
- Profile backend — slow database kueri atau heavy server-side berfungsi pada main document permintaan.
- Verify TLS adalah efficient (modern protocol, session resumption) dan DNS adalah fast.
- jika halaman adalah dynamic SSR, periksa apakah streaming adalah enabled di Anda framework — ini adalah sering off oleh default.
- pertimbangkan 103 Early Hints untuk render-critical resources jika Anda server/CDN mendukung ini.
- jika Anda gunakan service worker, periksa -nya startup isn’t menambahkan untuk TTFB pada pertama muat, dan itu -nya cache strategy helps repeat memuat.
TTFB cheat sheet
What TTFB adalah sum dari
- Redirect time
- Service worker startup (jika apa pun)
- DNS lookup
- Connection + TLS negotiation
- permintaan — up untuk pertama byte dari respons
Thresholds (75th percentile dari nyata-pengguna memuat)
| Band | Full TTFB (CrUX / web.dev) |
|---|---|
| baik | ≤ 0,8 s |
| perlu improvement | 0,8 s – 1,8 s |
| Poor | > 1,8 s |
Two thresholds, two scopes
| alat | Threshold | Measures |
|---|---|---|
| CrUX / web.dev (field) | 0,8 s “good” (terjemahan) “baik” | Full TTFB (DNS + conn + TLS + redirects + server) |
| Lighthouse audit (lab) | ~600 ms flag | server respons time hanya |
Fast facts
- TTFB adalah not sebuah Core Web Vital. Core Web Vitals adalah LCP, INP, CLS.
- ini adalah both sebuah field dan sebuah lab metric.
- Both FCP dan LCP sertakan TTFB — ini sets sebuah ceiling pada them.
- peringkat impact adalah indirect, via LCP — TTFB itself isn’t sebuah sinyal peringkat.
- DevTools labels ini “Waiting (TTFB)” (terjemahan) “Waiting (TTFB)” di Network panel.
- “good” (terjemahan) “baik” line moved dari 500 ms → 800 ms di 2022.
Fix priority: hosting → CDN → HTML/edge caching → cut redirects → stream markup → 103 Early Hints → efficient TLS → service worker startup.
alat untuk measuring TTFB
- PageSpeed Insights — easiest field read: menampilkan Anda CrUX TTFB (nyata Chrome pengguna) alongside sebuah lab run, untuk sebuah URL atau origin.
- Search Console — Core Web Vitals report — data lapangan grouped oleh URL pattern; place untuk spot TTFB masalah di scale.
- CrUX (Chrome pengguna Experience Report) — underlying field dataset; queryable directly via CrUX API atau BigQuery untuk historical trends.
- Chrome DevTools — Network panel — hover main document permintaan dan read “Waiting (TTFB)” (terjemahan) “Waiting (TTFB)” timing untuk sebuah precise lab breakdown dari connection vs server time.
- Lighthouse — runs “Reduce server response times” (terjemahan) “Reduce server respons times” audit (~600 ms server-time flag); dibangun ke DevTools dan PageSpeed Insights. sebagai dari Lighthouse 13, ini periksa surfaces inside “Document request latency” (terjemahan) “Document permintaan latency” insight.
- WebPageTest — detailed waterfalls dengan TTFB broken out oleh connection phase, dan multi-location/connection testing untuk isolate geographic latency.
- web-vitals JS library — collect TTFB (dan rest) dari Anda own pengguna nyata di field dan kirim ini untuk Anda analytics.
TTFB mistakes itu lead untuk wrong fix
Calling setiap delay sebuah server masalah
TTFB mencakup redirects, DNS, connection setup, TLS, service-worker startup, dan server processing. Break permintaan ke phases sebelum changing application code atau hosting.
Comparing Lighthouse’s 600 ms audit dengan 800 ms field threshold
Lighthouse audit adalah sebuah narrower lab diagnostic, while 0,8-kedua guidance describes full TTFB. Label source dan scope when reporting either angka.
Testing hanya dari sebuah location near origin
sebuah nearby lab dapat hide geographic latency. Compare regions atau gunakan nyata-pengguna data sebelum assuming yang sama experience applies untuk whole audience.
Chasing TTFB while halaman adalah sudah fast
sebuah tinggi TTFB dapat menjadi compatible dengan sebuah fast streamed atau cached experience. periksa apakah ini actually constrains FCP atau LCP sebelum prioritizing ini di atas sebuah larger bottleneck.
Diagnose sebuah slow TTFB oleh symptom
pertama permintaan adalah slow tetapi repeat permintaan adalah fast
mungkin cause: cold caches, connection setup, atau application warm-up. Fix: inspect cache headers dan separate cold dari warm tests. Confirm: waterfall menampilkan which connection atau server phase disappears pada repeat permintaan.
TTFB adalah slow hanya di distant regions
mungkin cause: physical distance untuk origin atau sebuah CDN cache miss. Fix: sajikan cacheable HTML closer untuk pengguna dan verify edge cache perilaku. Confirm: regional tests tampilkan sebuah shorter wait tanpa mengubah respons body.
sebuah URL memiliki much worse TTFB daripada -nya template peers
mungkin cause: redirects, sebuah uncached route, atau expensive halaman-spesifik backend berfungsi. Fix: compare rantai pengalihan, cache status, dan server timing dengan sebuah healthy peer. Confirm: outlier’s document permintaan moves back toward template baseline.
DevTools dan CrUX disagree
mungkin cause: one lab permintaan cannot mewakili field’s devices, locations, cache states, dan 75th percentile. Fix: gunakan lab permintaan untuk diagnose dan data lapangan untuk judge prevalence. Confirm: Anda RUM distribution menjelaskan which segment produces slower aggregate.
mengukur TTFB dari command line
gunakan curl’s timing variables untuk separate pertama byte dari DNS, connection, dan TLS setup.
curl -sS -o /dev/null \
-w 'dns=%{time_namelookup}s connect=%{time_connect}s tls=%{time_appconnect}s starttransfer=%{time_starttransfer}s total=%{time_total}s\n' \
https://example.com/time_starttransfer adalah command’s TTFB-style pengukuran. Run several cold dan warm permintaan dari more daripada one relevant region; sebuah single local sample adalah not sebuah field benchmark.
Read Navigation Timing di browser
const nav = performance.getEntriesByType('navigation')[0];
console.table({
ttfb: Math.round(nav.responseStart - nav.requestStart),
dns: Math.round(nav.domainLookupEnd - nav.domainLookupStart),
connect: Math.round(nav.connectEnd - nav.connectStart),
}); Prove sebuah TTFB perubahan took effect
Edge-cache test
Test untuk run: permintaan yang sama document twice dengan curl -sS -D - -o /dev/null, lalu inspect CDN’s cache-status dan age headers. Expected hasil: repeat permintaan adalah disajikan dari cache menurut CDN’s documented header. Failure interpretation: route adalah bypassing atau immediately expiring cache. Monitoring window: immediate. Rollback trigger: personalized, authenticated, atau stale HTML adalah disajikan untuk wrong permintaan.
Redirect-removal test
Test untuk run: gunakan curl -sS -I pada akhir public URL dan inspect rantai pengalihan separately. Expected hasil: intended entry URL reaches document without sebuah avoidable hop. Failure interpretation: routing atau canonical-host aturan masih tambahkan sebuah round trip. Monitoring window: immediate. Rollback trigger: perubahan breaks diperlukan HTTP-untuk-HTTPS atau hostname normalization.
Field TTFB test
Test untuk run: compare post-release Navigation Timing atau web-vitals TTFB oleh region dan template dengan pre-release baseline. Expected hasil: p75 improves di affected segments without more errors. Failure interpretation: lab gain melakukan not reach pengguna nyata atau shifted berfungsi elsewhere. Monitoring window: sebagai RUM traffic arrives; CrUX di atas -nya rolling window. Rollback trigger: error rate, cache correctness, atau pengguna-terlihat latency worsens.
TTFB metrics worth tracking
nyata-pengguna TTFB di p75
Metric: 75th-percentile TTFB oleh template, region, dan device class. What ini tells Anda: how panjang document permintaan delays sebagian besar nyata visits sebelum rendering dapat begin. cara pull ini: Navigation Timing, web-vitals library, CrUX, atau PageSpeed Insights. Benchmark / realistic range: 0,8 seconds atau less adalah baik target described di ini artikel; interpret segments separately. Cadence: weekly di RUM dan monthly untuk rolling public field trend.
Cache-hit TTFB versus cache-miss TTFB
Metric: p75 TTFB split oleh CDN’s cache outcome. What ini tells Anda: whether origin berfungsi atau edge delivery owns delay. cara pull ini: join respons cache-status headers dengan RUM atau CDN logs. Benchmark / realistic range: gunakan situs’s own regional baseline because provider, route, dan personalization differ. Cadence: weekly dan setelah cache-aturan perubahan.
TTFB share dari LCP
Metric: TTFB divided oleh LCP duration untuk yang sama visit. What ini tells Anda: whether server dan connection time adalah limiting bagian dari memuat experience. cara pull ini: collect TTFB dan LCP together di RUM. Benchmark / realistic range: no universal percentage adalah honest; prioritize TTFB when ini consistently consumes sebuah besar bagian dari LCP. Cadence: monthly oleh template.
Resources worth Anda time
My related writing
- Core Web Vitals: sebuah Beginner’s Guide — where TTFB fits among memuat metrics, dan why ini adalah sebuah supplemental metric alih-alih sebuah sinyal peringkat.
- Beginner’s Guide untuk SEO teknis — bigger picture situs performa sits inside.
Official
- web.dev’s TTFB dan mengoptimalkan TTFB — two definitive halaman.
- Chrome team’s 103 Early Hints write-up, dengan Shopify/Cloudflare hasil.
data
- HTTP Archive Web Almanac — performa chapter — panjang-run TTFB dan LCP data lapangan untuk whole web.
dari sekitar industry
- Cloudflare blog: Early Hints — Cloudflare’s own write-up pada shipping 103 Early Hints, including dunia nyata hasil dan CDN implementation detail.
- web-vitals JS library (GitHub) — canonical library untuk collecting TTFB (dan semua Web Vitals) dari pengguna nyata; gunakan ini untuk kirim field TTFB untuk Anda own analytics.
- HTTP Archive Web Almanac 2022 — performa — historical baseline showing 40% mobile baik-TTFB di bawah lalu-baru 800 ms threshold; berguna untuk multi-year trend context.
- Fastly — HTTP/2 server Push vs Early Hints — CDN perspective pada why Early Hints adalah replacing server Push untuk reducing TTFB impact.
Stats worth citing
- ~42% dari mobile situs memiliki sebuah “good” (terjemahan) “baik” TTFB — dan ini adalah barely moved di five years. Web Almanac’s mobile baik-TTFB rate memiliki hovered sekitar 41–42% di seluruh five years dari data: sebuah stubborn, web-wide stagnation. Source
- pada poor-LCP situs, TTFB alone consumed ~2,27 seconds — nearly entire 2,5-kedua “good LCP” (terjemahan) “baik LCP” threshold, sebelum apa pun konten rendered. TTFB adalah largest sub-bagian dari LCP untuk situs itu fail ini. Source
- 103 Early Hints delivered several hundred milliseconds dari LCP improvement di Shopify dan Cloudflare testing — di beberapa cases close untuk sebuah kedua faster. Source
- ** “good” (terjemahan) “baik” TTFB line moved dari 500 ms untuk 800 ms di 2022**, dan historical data adalah recalculated di bawah baru standard — worth knowing sebelum comparing old TTFB angka. Source
Test yourself: Time untuk pertama Byte
Five quick pertanyaan pada what TTFB measures dan cara meningkatkan ini. Pick sebuah jawaban untuk setiap, lalu periksa.
Log perubahan
Diperbarui 18 Jul 2026.
Ringkasan editorial dan detail perubahan yang tercatat.Detail perubahan
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
Perbandingan lengkap tidak tersedia — tidak ada cuplikan sebelumnya yang diarsipkan untuk revisi ini.