Skip to Content
Platform.Ontology

User Timing marks and measures

Lets a page stamp named points in time and measure the gaps between them.

Works without askingSpeed and timingMeasurementWeb browsersWhile you use it

In one line

Can mark points in time and measure gaps between them inside the page

Lets a page stamp named points in time and measure the gaps between them.

A site can time its own code in detail and send the numbers home, so it learns how fast the person's device and network really are. The marks live only in this tab and are not shared across sites.

What it can and can't do

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

It can

  • Stamp named moments in its own code
  • Measure how long each part took
  • Send the timings home to the site
  • Learn how fast your device and network really are

It cannot

  • Share marks between tabs, since they live in this tab only
  • Ask permission first
  • See your files
  • Keep the marks after you close the tab

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported282013-07-09None
EdgeSupported122015-07-29None
FirefoxSupported382015-05-12None
SafariSupported112017-09-19None
Safari on iPhoneSupported112017-09-19All iOS browsers use WebKit
Chrome on AndroidSupported282013-07-10None
Samsung InternetSupported1.52013-09-25None

How a site asks for it

APIperformance.mark('a'); performance.measure('m','a','b'); PerformanceObserver
Browser compat keysapi.Performance.mark
api.Performance.measure
api.PerformanceMark
How access is grantednone
What the user seesNone (no browser prompt)
Needs a secure context (HTTPS)No
Needs a user gestureNo
Activationnone
How long it lastsPer page; entries are in memory until the page closes or clearMarks is called
How to take it backNothing to revoke (no permission is stored)
Inside an iframePer frame; Timing is same-origin only for the page's own entries

Typical flow

  1. Page calls performance.mark(name)
  2. Browser records a timestamp with sub millisecond precision (subject to coarsening)
  3. Page calls performance.measure(name, a, b)
  4. Page reads entries or sends them to a server

Data you get

Shape: none

No individual data fields. The signal is the access itself.

Technical limits

  • Entries are per document and are not shared across origins
  • Timer resolution is coarsened: Chrome uses 100 microseconds (5 microseconds on cross-origin isolated pages); Firefox rounds more coarsely by default
  • No hard entry limit in the spec; browsers hold them in memory until cleared
  • detail object lets a page attach arbitrary data to a mark
  • Entries do not survive navigation

The story

What it is

A page can mark named points in time and measure the gaps between them.

For you

You never see it. Teams use it to label steps like Search started and Results shown, then measure from real visitors. That is how they find what slows you down.

For makers

It is the standard way to time what matters to your product, such as time to first video frame or time to checkout. Teams send the results to dashboards to compare releases.

Where you see it

TypeExampleApps
shoppingA shop marks Add to cart clicked and Cart updated, then watches the gap by device.Shopify stores
videoA video site marks play pressed and first frame shown to measure start up time.YouTube, Netflix
gamesA game portal times the gap between game page load and the first playable frame.Poki, CrazyGames
productivityA web editor times how long a file takes to open and become editable.Figma, Notion
analyticsA monitoring tool collects all custom marks and charts them by release.Datadog RUM, New Relic, SpeedCurve
mapsA web map times how long the first map tiles take to show after a search.Google Maps
travelA booking site times from Search to first results, to watch speed on slow phones.Booking.com

Risks

  • Reports sent to vendors
  • Rarely harmful on its own

What the platform says

  • MDN: User Timing. Lets developers add their own timing marks, so they can measure how long key steps take.

Good uses and abuse

Legitimate uses

  • Performance monitoring (RUM)
  • A/B and perf test harnesses
  • Profiling in DevTools Performance panel

Known abuse

  • Timing side channels
  • Device speed fingerprinting

Scores

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

History

  • 2013-07, Chrome 28: User Timing Level 1 ships
  • 2015-05, Firefox 38: Firefox ships User Timing
  • 2017-09, Safari 11: Safari ships User Timing

Sources

How well checked: Based on official documentation.

On this page