-
Notifications
You must be signed in to change notification settings - Fork 22.9k
Tweak LCP render time wording #41019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Preview URLs External URLs (1)URL:
(comment last updated: 2025-09-13 10:35:52) |
Yes it is. In most cases now the Ultimately the wording there is still specified and also still matches the changes proposed here which still mention it might be zero. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why the "### Cross-origin image render time" is duplicated. Is there a reason to not just have it in the page for renderTime
?
This is a somewhat fair comment. However, I'd prefer to have it duplicated for a couple of reasons:
Does that convince you at all that duplication, while not ideal, is important enough to have this on the top page? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why the "### Cross-origin image render time" is duplicated. Is there a reason to not just have it in the page for renderTime?
This is a somewhat fair comment. However, I'd prefer to have it duplicated for a couple of reasons:
We're talking about what to use for LCP time. So although this nuance is in regards to
renderTime
, it affects the over all value to be used for this API.We recommend kinda ignoring
renderTime
anyway. So to bury this information in that page feels kinda like... well burying it.Does that convince you at all that duplication, while not ideal, is important enough to have this on the top page?
This is a good point. But it's quite a complex bit of exposition and I do think duplicating it is tough on readers. As a reader I have to try to work out if this is actually exactly the same or if there are subtle differences I need to worry about. And then perhaps some maintainer will change one and not the other, and now there is a difference, and readers have to decide whether the difference is intentional or not.
My suggestion is to add a note to the interface page somewhat like:
To measure render time for cross-origin requests, set the {{httpheader("Timing-Allow-Origin")}} header.
To ensure more accurate results for cross-origin requests across all browsers, developers should use
startTime
instead ofrenderTime
as the LCP value.See Cross-origin image render time and Use startTime over renderTime for more details.
But I won't block approval on this, if you disagree.
@@ -30,6 +30,24 @@ Additional key paint moments are provided by the {{domxref("PerformancePaintTimi | |||
|
|||
{{InheritanceDiagram}} | |||
|
|||
### Cross-origin image render time | |||
|
|||
For security reasons, the value of the {{domxref("LargestContentfulPaint.renderTime", "renderTime")}} property was originally `0` if the resource is a cross-origin request. Instead the {{domxref("LargestContentfulPaint.loadTime", "loadTime")}} property should be used as a fallback. The {{domxref("PerformanceEntry.startTime", "startTime")}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a sentence fragment here. I didn't know if you also wanted to keep the preceding sentence on "Instead..." - I have removed it in my suggestion because it seems to me to be covered in the next section ("Use startTime") and because I think "Browsers may now" flows better without it. But your call.
For security reasons, the value of the {{domxref("LargestContentfulPaint.renderTime", "renderTime")}} property was originally `0` if the resource is a cross-origin request. Instead the {{domxref("LargestContentfulPaint.loadTime", "loadTime")}} property should be used as a fallback. The {{domxref("PerformanceEntry.startTime", "startTime")}} | |
For security reasons, the value of the {{domxref("LargestContentfulPaint.renderTime", "renderTime")}} property was originally `0` if the resource is a cross-origin request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I've removed this whole section from the LCP page and referenced the section in the renderTime page as suggested.
So I made this suggested change in that page instead.
|
||
For security reasons, the value of the {{domxref("LargestContentfulPaint.renderTime", "renderTime")}} property was originally `0` if the resource is a cross-origin request. Instead the {{domxref("LargestContentfulPaint.loadTime", "loadTime")}} property should be used as a fallback. The {{domxref("PerformanceEntry.startTime", "startTime")}} | ||
|
||
Browsers [may now expose a slightly coarsened render time](https://github.com/w3c/paint-timing/issues/104) in these situations. Check for [browser support](#browser_compatibility). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link goes to the interface BCD table, which doesn't show detailed compat for renderTime
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does under cross-origin
under renderTime
:

I'm not convinced this is obvious to developer that this is what this represents but was asked to change it from my original suggestion of cross-origin-render-time
OK reworked it to have a lighter explanation on the LCP page and link to the heavier explanation on the |
Description
I noticed some inaccuracies in the LCP render time page:
startTime
section as I found that difficult to understand.I changed this in #37743 but missed these.
Motivation
Correct inaccuracies to avoid confusion
Additional details
Related issues and pull requests
Relates to: #37743
Relates to: w3c/largest-contentful-paint#138