This feature is not Baseline because it does not work in some of the most widely-used browsers.
The renderTime read-only property of the LargestContentfulPaint interface represents the time that the element was rendered to the screen.
The renderTime property can have the following values:
timestamp representing the time in milliseconds that the element was rendered to the screen.0 if the resource is a cross-origin request and no Timing-Allow-Origin HTTP response header is used.This example uses a PerformanceObserver notifying of new largest-contentful-paint performance entries as they are recorded in the browser's performance timeline. The buffered option is used to access entries from before the observer creation.
const observer = new PerformanceObserver((list) => {
const entries = list.getEntries();
const lastEntry = entries[entries.length - 1]; // Use the latest LCP candidate
console.log(lastEntry.renderTime);
});
observer.observe({ type: "largest-contentful-paint", buffered: true });
For security reasons, the value of the renderTime property was originally 0 if the resource is a cross-origin request. Instead the loadTime property should be used as a fallback.
Browsers may now expose a slightly coarsened render time in these situations. Check for browser support.
To expose more accurate cross-origin render-time information, the Timing-Allow-Origin HTTP response header needs to be set.
For example, to allow https://developer.mozilla.org to see an accurate renderTime, the cross-origin resource should send:
Timing-Allow-Origin: https://developer.mozilla.org
Alternatively, you can use startTime which returns the value of the entry's renderTime if it is not 0, and otherwise the value of this entry's loadTime. However, it is recommended to set the Timing-Allow-Origin header so that the metrics will be more accurate.
If you use startTime, you can flag any inaccuracies by checking if renderTime was used:
const isAccurateLCP = Boolean(entry.renderTime);
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
renderTime |
77 | 79 | 122 | 64 | No | 77 | 122 | 55 | No | 12.0 | 77 | No |
cross-origin |
133 | 133 | 141 | 118 | No | 133 | 141 | 88 | No | No | 133 | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint/renderTime