Navigation and Resource Timing
Reports DNS, connect, TLS and download timings for the page and each resource.
In one line
Can see how fast the page and each file loaded for you
Reports DNS, connect, TLS and download timings for the page and each resource.
Reveals connection speed and CDN behavior, whether a request hit the cache, protocol (h2, h3) and TLS reuse. Cross-origin detail needs the Timing-Allow-Origin header, otherwise sizes and phases are zeroed.
What it can and can't do
What the user does: Nothing. It happens as the page loads
It can
- Get timings for DNS, connection, security setup and download
- Learn your connection speed and if a file came from cache
- Learn the web protocol used, such as h2 or h3
- Get full detail for outside files only if their site allows it
It cannot
- See what is inside other sites' files
- Ask permission first
- Know who you are by itself
- See full outside detail without that site's approval
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 29 | 2013-08-20 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 35 | 2015-01-13 | None |
| Safari | Supported | 11 | 2017-09-19 | None |
| Safari on iPhone | Supported | 11 | 2017-09-19 | None |
| Chrome on Android | Supported | 29 | 2013-08-21 | None |
| Samsung Internet | Supported | 2.0 | 2014-10-17 | None |
How a site asks for it
| API | performance.getEntriesByType('navigation'|'resource'); PerformanceObserver |
| Browser compat keys | api.PerformanceResourceTimingapi.PerformanceNavigationTiming |
| How access is granted | none |
| What the user sees | Not listed |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Not listed |
| How to take it back | Not listed |
| Inside an iframe | Not listed |
Typical flow
- Read PerformanceNavigationTiming and resource entries
- Check nextHopProtocol, transferSize, responseStart, connectStart
- Send to analytics
Data you get
What comes back: One entry per resource, about 20 timestamps each
Shape: list
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
duration | float | ms | 0 to 60000 | 5 microseconds to 1 ms (timer limited) |
transferSize | integer | bytes | 0 to GB | exact for same origin or TAO; 0 if cached |
nextHopProtocol | string | None | h2, h3, http/1.1 | exact |
Technical limits
- Cross-origin detail zeroed without TAO
- Buffer limited to 250 resource entries by default
- Cannot see response bodies
The story
What it is
Browsers report timings for the page and each file it loads: DNS, connection, security handshake and download.
For you
You never see it. Sites quietly collect how fast each page and image loaded for you. Your slow connection is turned into data that helps them fix slow pages.
For makers
It is the base of web speed monitoring. Teams compare load times by country, network and device. It also lets ad and tracker scripts see timing of other files, so browsers limit cross site detail.
Where you see it
| Type | Example | Apps |
|---|---|---|
| analytics | A monitoring service collects load times from real visitors and shows a map of the slowest regions. | Datadog RUM, New Relic, Cloudflare Web Analytics |
| shopping | A retailer finds that its image server is slow in one country and adds a closer cache. | None named |
| video | A video site checks how long the first video segment takes to arrive and adjusts quality. | YouTube, Netflix |
| games | A game portal measures asset download times to see how long players wait before playing. | None named |
| ads | An ad network measures how long each ad takes to load and drops slow ad partners. | None named |
| security | A fraud tool compares timing with the claimed location. A login that says Paris but loads like Asia looks odd. | None named |
| news | A news site measures third party script times to learn which tags slow the page. | None named |
Risks
- Can hint at your location
- Cross site limits apply
What the platform says
- MDN: Navigation timing. Describes how pages can read detailed timings about how they loaded.
- MDN: Resource timing. Describes how pages can measure the timing of each file they request.
Good uses and abuse
Legitimate uses
- Real user monitoring, Core Web Vitals
Known abuse
- Infer cache state, ISP speed, VPN latency
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 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 | 3 | Rough identifying entropy, when known |
History
- 2020-01, Chrome: Cross-origin entries reduced without Timing-Allow-Origin
- 2023-09, Chrome: Resource timing gets responseStatus and contentType
Related capabilities
Related
- Server-Timing header. Can pass timing numbers from the server to page scripts
- Cache timing history sniffing. Can time how fast something loads to guess if you visited a site before
Sources
How well checked: Based on official documentation.