User Timing marks and measures
Lets a page stamp named points in time and measure the gaps between them.
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
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 28 | 2013-07-09 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 38 | 2015-05-12 | None |
| Safari | Supported | 11 | 2017-09-19 | None |
| Safari on iPhone | Supported | 11 | 2017-09-19 | All iOS browsers use WebKit |
| Chrome on Android | Supported | 28 | 2013-07-10 | None |
| Samsung Internet | Supported | 1.5 | 2013-09-25 | None |
How a site asks for it
| API | performance.mark('a'); performance.measure('m','a','b'); PerformanceObserver |
| Browser compat keys | api.Performance.markapi.Performance.measureapi.PerformanceMark |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | Per page; entries are in memory until the page closes or clearMarks is called |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Per frame; Timing is same-origin only for the page's own entries |
Typical flow
- Page calls performance.mark(name)
- Browser records a timestamp with sub millisecond precision (subject to coarsening)
- Page calls performance.measure(name, a, b)
- 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
| Type | Example | Apps |
|---|---|---|
| shopping | A shop marks Add to cart clicked and Cart updated, then watches the gap by device. | Shopify stores |
| video | A video site marks play pressed and first frame shown to measure start up time. | YouTube, Netflix |
| games | A game portal times the gap between game page load and the first playable frame. | Poki, CrazyGames |
| productivity | A web editor times how long a file takes to open and become editable. | Figma, Notion |
| analytics | A monitoring tool collects all custom marks and charts them by release. | Datadog RUM, New Relic, SpeedCurve |
| maps | A web map times how long the first map tiles take to show after a search. | Google Maps |
| travel | A 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
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 1 | Rough 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
Related capabilities
Related
- High resolution timer precision. Can use a clock whose sharpness shows your browser and privacy mode
- Navigation and Resource Timing. Can see how fast the page and each file loaded for you
Sources
How well checked: Based on official documentation.