console: timeStamp() static method

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

Note: This feature is available in Web Workers.

The console.timeStamp() static method adds a single marker to the browser's Performance tool (Firefox bug 1387528, Chrome). This lets you correlate a point in your code with the other events recorded in the timeline, such as layout and paint events.

You can optionally supply an argument to label the timestamp, and this label will then be shown alongside the marker.

Some browsers have further extended this console.timeStamp() method to allow additional, optional parameters to be provided as part of its extensibility API that surfaces these in performances traces. See the Chrome's extensibility API documentation for more information.

Syntax

js
console.timeStamp(label);
console.timeStamp(label, start, end, trackName, trackGroup, color, data);

Parameters

color Optional

A string for the display colour of the entry. Must be one of "primary", "primary-light", "primary-dark", "secondary", "secondary-light", "secondary-dark", "tertiary", "tertiary-light", "tertiary-dark", "error".

data Optional

An object with additional data to display. URLs may automatically be turned into links by some browsers.

Note: Support for the data parameter varies across browsers and their DevTools implementations. For example, in some versions of Chrome, this data may not appear in the Performance panel.

end Optional

A string referencing a previously defined timeStamp label or a timestamp (DOMHighResTimeStamp) to be used as the end time.

label Optional

Label for the timestamp.

start Optional

A string referencing a previously defined timeStamp label or a timestamp (DOMHighResTimeStamp) to be used as the start time.

trackName Optional

The name of the custom track used to display the timestamp data

trackGroup Optional

The group of the custom track used to display the timestamp data

Return value

None (undefined).

Examples

Basic usage

js
console.timeStamp("marker 1");

Using the Extensibility API to provide richer details for display

js
// 1. Create a duration event with rich data
const start = performance.now() - 150;
const end = performance.now() - 20;

const durationData = {
  processingTime: `${end - start}ms`,
  info: "Check this URL: https://example.com for more.",
  metrics: {
    items: 5,
    isCached: true,
  },
};

console.timeStamp(
  "My Timed Task", // label
  start, // startTime
  end, // endTime
  "Tasks", // trackName
  "My Extension", // trackGroup
  "tertiary", // color
  durationData, // data (object)
);

// 2. Create an instant event with a deep link for a DevTools extension
const linkData = {
  url: "ext://resource/123",
  description: "View Resource 123",
  otherDetail: "This data also appears in the JSON viewer",
};

console.timeStamp(
  "Event with Link", // label
  performance.now(), // startTime (instant)
  undefined, // endTime (instant)
  "Tasks", // trackName
  "My Extension", // trackGroup
  "primary-light", // color
  linkData, // data (object)
);

Browser compatibility

desktop mobile server
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Bun
Deno
Node.js
timeStamp() static method
Non-standard
Chrome – Full support
Chrome 15 (Release date: 2011-10-25)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – No support
Firefox 39 – 96 (Release date: 2015-07-02)
footnote Removed in 97 and later
Firefox – Partial support
Firefox 98 – 148 (Release date: 2022-03-08)
footnote Partial support
footnote The method can be called, but the marker does not show up in the performance profile.
footnote See bug 1387528
Firefox – Full support
Firefox 149 (Release date: 2026-03-24)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 6 (Release date: 2012-07-25)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
footnote Full support
Firefox for Android – No support
Firefox for Android 39 – 96 (Release date: 2015-07-02)
footnote Removed in 97 and later
Firefox for Android – Partial support
Firefox for Android 98 – 148 (Release date: 2022-03-08)
footnote Partial support
footnote The method can be called, but the marker does not show up in the performance profile.
footnote See bug 1387528
Firefox for Android – Full support
Firefox for Android 149 (Release date: 2026-03-24)
footnote Full support
Opera Android – Full support
Opera Android 14 (Release date: 2013-05-21)
footnote Full support
Safari on iOS – Full support
Safari on iOS 6 (Release date: 2012-09-10)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 6 (Release date: 2012-09-10)
footnote Full support
Bun – Full support
Bun 1 (Release date: 2023-09-08)
footnote Full support
Deno – Full support
Deno 1.29 (Release date: 2022-12-15)
footnote Full support
Node.js – No support
Node.js 8 (Release date: 2017-05-30)
disabled
disabled From version 8.0.0 users must explicitly set the --inspect runtime flag.
color parameter
Experimental Non-standard
Chrome – Full support
Chrome 134 (Release date: 2025-03-04)
footnote Full support
Edge – Full support
Edge 134 (Release date: 2025-03-06)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 119 (Release date: 2025-05-13)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 134 (Release date: 2025-03-04)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 88 (Release date: 2025-03-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 29 (Release date: 2025-10-25)
footnote Full support
WebView Android – Full support
WebView Android 134 (Release date: 2025-03-04)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Bun – No support
Bun
footnote No support
Deno – No support
Deno
footnote No support
Node.js – No support
Node.js
footnote No support
data parameter
Experimental Non-standard
Chrome – Full support
Chrome 141 (Release date: 2025-09-30)
footnote Full support
Edge – Full support
Edge 141 (Release date: 2025-10-03)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 125 (Release date: 2025-12-04)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 141 (Release date: 2025-09-30)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 93 (Release date: 2025-11-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 141 (Release date: 2025-09-30)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Bun – No support
Bun
footnote No support
Deno – No support
Deno
footnote No support
Node.js – No support
Node.js
footnote No support
end parameter
Experimental Non-standard
Chrome – Full support
Chrome 134 (Release date: 2025-03-04)
footnote Full support
Edge – Full support
Edge 134 (Release date: 2025-03-06)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 119 (Release date: 2025-05-13)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 134 (Release date: 2025-03-04)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 88 (Release date: 2025-03-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 29 (Release date: 2025-10-25)
footnote Full support
WebView Android – Full support
WebView Android 134 (Release date: 2025-03-04)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Bun – No support
Bun
footnote No support
Deno – No support
Deno
footnote No support
Node.js – No support
Node.js
footnote No support
label parameter
Non-standard
Chrome – Full support
Chrome 15 (Release date: 2011-10-25)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – Full support
Safari 6 (Release date: 2012-07-25)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 14 (Release date: 2013-05-21)
footnote Full support
Safari on iOS – Full support
Safari on iOS 6 (Release date: 2012-09-10)
footnote Full support
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
footnote Full support
WebView on iOS – Full support
WebView on iOS 6 (Release date: 2012-09-10)
footnote Full support
Bun – Full support
Bun 1 (Release date: 2023-09-08)
footnote Full support
Deno – Full support
Deno 1.29 (Release date: 2022-12-15)
footnote Full support
Node.js – No support
Node.js 8 (Release date: 2017-05-30)
disabled
disabled From version 8.0.0 users must explicitly set the --inspect runtime flag.
start parameter
Experimental Non-standard
Chrome – Full support
Chrome 134 (Release date: 2025-03-04)
footnote Full support
Edge – Full support
Edge 134 (Release date: 2025-03-06)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 119 (Release date: 2025-05-13)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 134 (Release date: 2025-03-04)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 88 (Release date: 2025-03-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 29 (Release date: 2025-10-25)
footnote Full support
WebView Android – Full support
WebView Android 134 (Release date: 2025-03-04)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Bun – No support
Bun
footnote No support
Deno – No support
Deno
footnote No support
Node.js – No support
Node.js
footnote No support
trackGroup parameter
Experimental Non-standard
Chrome – Full support
Chrome 134 (Release date: 2025-03-04)
footnote Full support
Edge – Full support
Edge 134 (Release date: 2025-03-06)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 119 (Release date: 2025-05-13)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 134 (Release date: 2025-03-04)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 88 (Release date: 2025-03-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 29 (Release date: 2025-10-25)
footnote Full support
WebView Android – Full support
WebView Android 134 (Release date: 2025-03-04)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Bun – No support
Bun
footnote No support
Deno – No support
Deno
footnote No support
Node.js – No support
Node.js
footnote No support
trackName parameter
Experimental Non-standard
Chrome – Full support
Chrome 134 (Release date: 2025-03-04)
footnote Full support
Edge – Full support
Edge 134 (Release date: 2025-03-06)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 119 (Release date: 2025-05-13)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 134 (Release date: 2025-03-04)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 88 (Release date: 2025-03-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 29 (Release date: 2025-10-25)
footnote Full support
WebView Android – Full support
WebView Android 134 (Release date: 2025-03-04)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Bun – No support
Bun
footnote No support
Deno – No support
Deno
footnote No support
Node.js – No support
Node.js
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Experimental. Expect behavior to change in the future.
Non-standard. Check cross-browser support before using.
User must explicitly enable this feature.
Has more compatibility info.

See also