Skip to content
Performance & Accessibility

Server-Timing Header: What Actually Works

An HTTP response header that reports how long server-side steps took, such as database queries or cache lookups, so the timings appear in browser tools and monitoring.

MediaScaleUp Editorial Team 2 min read 12 views
Server-Timing Header: What Actually Works

What is at stake

When Time to First Byte is slow, Server-Timing shows which part of the backend is responsible without needing access to server logs.

The playbook

  1. Report timings for database, cache and rendering steps
  2. Use short, consistent metric names
  3. Collect the values in real user monitoring
  4. Limit detailed timings to trusted environments if sensitive
  5. Compare timings before and after backend changes

Where it goes wrong

Avoid:

  • Exposing sensitive internal names publicly
  • Dozens of metrics on every response
  • Measuring only in production without a baseline
  • Ignoring CDN timing between browser and origin
What to do and what to avoid with server-timing header, side by side
Good practice against the usual mistakes, from the sources listed below.

The numbers behind it

Published figures for Server-Timing Header
MeasureFigure
HeaderServer-Timing, with named metrics and durations
Visibilityshown in the Timing section of browser DevTools
JavaScript accessavailable through the PerformanceServerTiming interface
Securitytimings can reveal internal details, so exposure should be controlled

Getting outside help

When to hand it over: Bring in help when server response time is poor and the slow backend step is unknown.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Performance & Accessibility work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

MediaScaleUp Editorial Team

Articles here are researched, written and checked by the MediaScaleUp studio team before they are published, and dated when they are reviewed.

Keep reading

More in Performance & Accessibility