Wat is TTFB (Time to First Byte)?
Snelle definitie
TTFB meet de tijd van het moment dat een browser een pagina aanvraagt totdat het de eerste byte aan gegevens van de server ontvangt, als indicator van serverrespons.
Time to First Byte (TTFB) is a performance metric that measures the duration between a user's browser sending a request and receiving the very first byte of the server's response. It captures three phases: the time to send the request, the time the server takes to process it, and the time for the first byte to travel back.
A good TTFB is under 200 milliseconds. Between 200-500ms is acceptable, and anything over 600ms indicates a performance problem. Google considers TTFB when evaluating page experience, though it's not one of the Core Web Vitals.
Several factors affect TTFB. Server processing time depends on how long it takes to run database queries, execute server-side code, and generate the response. Network latency is the physical travel time between the user and server (which a CDN can reduce). DNS resolution time is how long it takes to convert your domain name to an IP address.
Common causes of slow TTFB include overloaded or underpowered servers, unoptimized database queries, lack of server-side caching, slow third-party API calls during page generation, and no CDN (meaning all requests go to a single origin server). Each of these can be diagnosed and improved with targeted optimizations.
Waarom het belangrijk is
TTFB is the starting gun for your page load. Nothing else can happen until the browser receives that first byte. A slow TTFB delays everything: the HTML document, the CSS, the JavaScript, the images. It's the foundation that all other performance metrics build on.
For businesses, TTFB directly impacts user experience and conversion rates. If your server takes 2 seconds to respond before the browser can even start rendering the page, users on slower connections might wait 5+ seconds for a usable page.
Praktijkvoorbeelden
A WordPress site with a TTFB of 1.8 seconds implemented server-side caching and reduced it to 150ms, cutting total page load time by more than half
An e-commerce platform discovered their TTFB was 900ms due to slow database queries; adding database indexes and query caching brought it down to 120ms
A media site moved their origin server from a single US location to a CDN with edge caching, reducing TTFB for European users from 800ms to 80ms
A SaaS dashboard reduced their TTFB from 1.2 seconds to 200ms by pre-computing frequently accessed data and caching the results
Gerelateerde termen
Core Web Vitals
Core Web Vitals zijn drie specifieke statistieken van Google die de werkelijke gebruikerservaring op websites meten: laadprestaties (LCP), interactiviteit (INP) en visuele stabiliteit (CLS).
CDN (Content Delivery Network)
Een CDN is een netwerk van geografisch verspreide servers die webinhoud aan gebruikers levert vanaf de server die het dichtst bij hen staat, waardoor laadtijden worden verkort.
Caching
Caching is het proces van het opslaan van kopieën van gegevens of bestanden op een tijdelijke locatie, zodat toekomstige verzoeken sneller kunnen worden bediend.
LCP (Largest Contentful Paint)
LCP meet de tijd die nodig is voor het grootste zichtbare contentelement op een pagina, zoals een hero-afbeelding of een koptekst, om volledig te worden weergegeven.
Hulp nodig met ttfb (time to first byte)?
Ons team kan u helpen dit concept in de praktijk te brengen. Vraag een gratis consult aan om uw project te bespreken.