Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2023.
Note: This feature is available in Web Workers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The PerformanceServerTiming interface surfaces server metrics that are sent with the response in the Server-Timing HTTP header.
This interface is restricted to the same origin, but you can use the Timing-Allow-Origin header to specify the domains that are allowed to access the server metrics. Note that this interface is only available in secure contexts (HTTPS) in some browsers.
A string value of the server-specified metric description, or an empty string.
PerformanceServerTiming.duration Read onlyA double that contains the server-specified metric duration, or value 0.0.
PerformanceServerTiming.name Read onlyA string value of the server-specified metric name.
Returns a JSON representation of the PerformanceServerTiming object.
Given a server that sends the Server-Timing header, for example a Node.js server like this:
The PerformanceServerTiming entries are now observable from JavaScript via the PerformanceResourceTiming.serverTiming property and live on navigation and resource entries.
Example using a PerformanceObserver, which notifies of new navigation and resource performance entries as they are recorded in the browser's performance timeline. Use the buffered option to access entries from before the observer creation.
Example using Performance.getEntriesByType(), which only shows navigation and resource performance entries present in the browser's performance timeline at the time you call this method:
| Server Timing # the-performanceservertiming-interface |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Oct 12, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.