How to reduce server response time (TTFB) and page weight
Time to First Byte (TTFB) is how long the server takes to start sending the page after it is requested.
Why it matters
Nothing can appear on screen until the HTML arrives, so a slow server delays everything else. Google suggests a TTFB of 0.8 seconds or less.
Uncompressed HTML can be five to ten times larger than it needs to be, which slows down visitors on mobile connections.
How to fix it
- Turn on page caching in your CMS or framework so pages aren’t rebuilt for every visitor.
- Serve the site through a CDN so responses come from a location near each visitor.
- Enable Brotli or gzip compression for HTML, CSS and JavaScript; most hosts and CDNs have a switch for it.
- Upgrade slow hosting, and look for slow database queries or plugins.
- Keep HTML lean: avoid inlining huge data blobs, base64 images or thousands of hidden elements.