The Performance interface provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API.
An object of this type can be obtained by calling the Window.performance read-only attribute.
Note: This interface and its members are available in Web Workers, except where indicated below. Also note that performance markers and measures are per context. If you create a mark on the main thread (or other worker), you cannot see it in a worker thread, and vice versa.
Properties
The Performance interface doesn't inherit any properties.
-
Performance.navigationRead only Not available to workers - A
PerformanceNavigationobject that provides useful context about the operations included in the times listed intiming, including whether the page was a load or a refresh, how many redirections occurred, and so forth. -
Performance.timingRead only Not available to workers - A
PerformanceTimingobject containing latency-related performance information performance.memory- A non-standard extension added in Chrome, this property provides an object with basic memory usage information. You should not use this non-standard API.
Performance.timeOriginRead only- Returns the high resolution timestamp of the start time of the performance measurement.
-
Event handlers
Performance.onresourcetimingbufferfull- An
EventTargetwhich is a callback that will be called when theresourcetimingbufferfullevent is fired.
Methods
The Performance interface doesn't inherit any methods.
Performance.clearMarks()- Removes the given mark from the browser's performance entry buffer.
Performance.clearMeasures()- Removes the given measure from the browser's performance entry buffer.
Performance.clearResourceTimings()- Removes all
performance entrieswith aentryTypeof "resource" from the browser's performance data buffer. Performance.getEntries()- Returns a list of
PerformanceEntryobjects based on the given filter. Performance.getEntriesByName()- Returns a list of
PerformanceEntryobjects based on the given name and entry type. Performance.getEntriesByType()- Returns a list of
PerformanceEntryobjects of the given entry type. Performance.mark()- Creates a
timestampin the browser's performance entry buffer with the given name. Performance.measure()- Creates a named
timestampin the browser's performance entry buffer between two specified marks (known as the start mark and end mark, respectively). Performance.now()- Returns a
DOMHighResTimeStamprepresenting the number of milliseconds elapsed since a reference instant. Performance.setResourceTimingBufferSize()- Sets the browser's resource timing buffer size to the specified number of "
resource"typeperformance entryobjects. Performance.toJSON()Not available to workers- Is a jsonizer returning a json object representing the
Performanceobject.
Specifications
Browser compatibility
| Desktop | Mobile | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Basic support | Chrome Full support 6 | Edge Full support Yes | Firefox Full support 7 | IE Full support 9 | Opera Full support 15 | Safari Full support 8 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 7 | Opera Android Full support 15 | Safari iOS Full support 9 | Samsung Internet Android ? |
clearMarks | Chrome Full support 43 | Edge Full support Yes | Firefox Full support 41 | IE Full support 10 | Opera Full support 33 | Safari Full support 11 | WebView Android Full support 46 | Chrome Android Full support 46 | Edge Mobile Full support Yes | Firefox Android Full support 42 | Opera Android Full support 33 | Safari iOS Full support 11 | Samsung Internet Android ? |
clearMeasures | Chrome Full support 43 | Edge Full support Yes | Firefox Full support 41 | IE Full support 10 | Opera Full support 33 | Safari Full support 11 | WebView Android Full support 46 | Chrome Android Full support 46 | Edge Mobile Full support Yes | Firefox Android Full support 42 | Opera Android Full support 33 | Safari iOS Full support 11 | Samsung Internet Android ? |
clearResourceTimings | Chrome
Full support
46
| Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support 11 | WebView Android
Full support
46
| Chrome Android
Full support
46
| Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support 11 | Samsung Internet Android ? |
getEntries | Chrome Full support Yes | Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera No support No | Safari Full support 11 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 25 | Opera Android No support No | Safari iOS Full support 11 | Samsung Internet Android ? |
getEntriesByName | Chrome Full support Yes | Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera No support No | Safari Full support 11 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 25 | Opera Android No support No | Safari iOS Full support 11 | Samsung Internet Android ? |
getEntriesByType | Chrome Full support Yes | Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera No support No | Safari Full support 11 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 25 | Opera Android No support No | Safari iOS Full support 11 | Samsung Internet Android ? |
mark | Chrome Full support 43 | Edge Full support Yes | Firefox Full support 41 | IE Full support 10 | Opera Full support 33 | Safari Full support 11 | WebView Android Full support 46 | Chrome Android Full support 46 | Edge Mobile Full support Yes | Firefox Android Full support 42 | Opera Android Full support 33 | Safari iOS Full support 11 | Samsung Internet Android ? |
measure | Chrome Full support 43 | Edge Full support Yes | Firefox Full support 41 | IE Full support 10 | Opera Full support 33 | Safari Full support 11 | WebView Android Full support 46 | Chrome Android Full support 46 | Edge Mobile Full support Yes | Firefox Android Full support 42 | Opera Android Full support 33 | Safari iOS Full support 11 | Samsung Internet Android ? |
memory | Chrome Full support Yes | Edge ? | Firefox No support No | IE ? | Opera Full support Yes | Safari No support No | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android No support No | Opera Android Full support Yes | Safari iOS No support No | Samsung Internet Android ? |
navigation | Chrome Full support 10 | Edge Full support Yes | Firefox Full support 7 | IE Full support 9 | Opera Full support 15 | Safari Full support 8 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 7 | Opera Android No support No | Safari iOS Full support 9 | Samsung Internet Android ? |
now | Chrome Full support 24 | Edge Full support Yes | Firefox
Full support
15
| IE Full support 10 | Opera Full support 15 | Safari Full support 8 | WebView Android Full support Yes | Chrome Android Full support 25 | Edge Mobile Full support Yes | Firefox Android
Full support
15
| Opera Android No support No | Safari iOS Full support 9 | Samsung Internet Android ? |
onresourcetimingbufferfull | Chrome
Full support
46
| Edge ? | Firefox Full support Yes | IE No support No | Opera No support No | Safari No support No | WebView Android
Full support
46
| Chrome Android
Full support
46
| Edge Mobile ? | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS No support No | Samsung Internet Android ? |
setResourceTimingBufferSize | Chrome
Full support
46
| Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari No support No | WebView Android
Full support
46
| Chrome Android
Full support
46
| Edge Mobile Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS No support No | Samsung Internet Android ? |
timeOrigin | Chrome Full support 62 | Edge ? | Firefox Full support 59 | IE ? | Opera Full support 49 | Safari No support No | WebView Android Full support 62 | Chrome Android Full support 62 | Edge Mobile ? | Firefox Android Full support 59 | Opera Android Full support 49 | Safari iOS No support No | Samsung Internet Android ? |
timing | Chrome Full support 6 | Edge Full support Yes | Firefox Full support 7 | IE Full support 9 | Opera Full support 15 | Safari Full support 8 | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile Full support Yes | Firefox Android Full support 7 | Opera Android Full support 15 | Safari iOS Full support 9 | Samsung Internet Android ? |
toJSON | Chrome No support No | Edge Full support Yes | Firefox Full support 25 | IE ? | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Edge Mobile Full support Yes | Firefox Android Full support 25 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android ? |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.
- Non-standard. Expect poor cross-browser support.
- Non-standard. Expect poor cross-browser support.
- Deprecated. Not for use in new websites.
- Deprecated. Not for use in new websites.
- See implementation notes.
- See implementation notes.
- Requires a vendor prefix or different name for use.
- Requires a vendor prefix or different name for use.