Skip to Content
Platform.Ontology

Server-Timing header

Servers send timing metrics to the page through a response header.

Gets silentlySpeed and timingPerformance APIWeb browsersWhile you use it

In one line

Can pass timing numbers from the server to page scripts

Servers send timing metrics to the page through a response header.

Lets a backend or CDN expose database, cache and edge timings to client JavaScript, for monitoring or for leaking server state when cross-origin readable.

What it can and can't do

What the user does: Nothing. It happens as the page loads

It can

  • Send database, cache and edge time numbers in a response header
  • Let page code see those numbers
  • Show server details when another site allows other sites to see them

It cannot

  • Show you the numbers by itself
  • See your files
  • Ask permission first
  • Show another site's timings without that site's approval

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported652018-03-06None
EdgeSupported792020-01-15None
FirefoxSupported612018-06-26None
SafariSupported16.42023-03-27None
Safari on iPhoneSupported16.42023-03-27None
Chrome on AndroidSupported652018-03-06None
Samsung InternetSupported9.02018-09-15None

How a site asks for it

APIServer-Timing: db;dur=53, cache;desc="hit"; PerformanceResourceTiming.serverTiming
Browser compat keysapi.PerformanceServerTiming
http.headers.Server-Timing
How access is grantednone
What the user seesNot listed
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsNot listed
How to take it backNot listed
Inside an iframeNot listed

Typical flow

  1. Server adds Server-Timing header
  2. Browser parses into serverTiming entries
  3. Script reads name, duration, description

Data you get

What comes back: Each metric name plus dur in ms
Shape: list

FieldTypeUnitRangePrecision
durationfloatms0 to unboundedas sent by server

Technical limits

  • Cross-origin requires Timing-Allow-Origin
  • Not a fingerprint, reveals server side state

The story

What it is

A website's server sends timing numbers to the page, such as how long the database took.

For you

You never see it. When a page loads, the server may say it took 120 ms to look something up. That number goes into the browser tools and helps the team fix slow pages.

For makers

Teams use it to see exactly where a page spends time, in the server, cache or database, right from real visitors. It also lets edge networks report cache hits, so teams can tune them.

Where you see it

TypeExampleApps
shoppingA retailer sees that a product page waits 400 ms on its stock database, and speeds it up.None named
developerA developer reads timing in browser tools to see if a slow page is the server or the network.None named
analyticsA monitoring service collects server timing from real visitors and charts slow steps.Datadog RUM, New Relic
newsA news site learns that its CDN missed the cache for a viral story and fixes the rules.Cloudflare, Fastly
gamesA game site checks how long the matchmaking call takes before a player joins a lobby.None named
bankingA bank tracks how long each login step takes on the server to find slow spots.None named
securityA site sees that server time spikes during an attack and uses the numbers to respond.None named

Risks

  • Can expose internals
  • Seen by scripts on the page

What the platform says

Good uses and abuse

Legitimate uses

  • Performance debugging and CDN diagnostics (Cloudflare, Fastly, Vercel)

Known abuse

  • Server can tag visitors for correlation, cross-origin side channels with TAO

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits1Rough identifying entropy, when known

History

  • 2023-03, Safari 16.4: Server-Timing supported

Sources

How well checked: Based on official documentation.

On this page