-
Notifications
You must be signed in to change notification settings - Fork 28
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
Consider to expose decoding time for FCP and LCP? #104
Comments
This is also connected to #62. |
We've discussed this with the security folks. So the current proposal is to remove the TAO restrictions, and instead coarsen the render time by 4ms (and clamp to the load time) when the document is not cross-origin-isolated. This would make trying to use timing attacks to figure out information about cross-origin images based on their decoding time not useful. |
A more detailed explanation about this for the WG call:
|
The TAO check does not add any security measure, given rendering same-origin and cross-origin images in the same frame would result in the same renderTime. Closes #104
I haven't get a chance to do a proper testing for this, so I'll just refer to Michal's slide for TPAC 2022. Based on the slides, Firefox and Safari doesn't wait for the image to be decoded for FCP, but Chrome does.
Should we update the spec for FCP to wait for the image to be decoded?
I think the spec for LCP only waits for the size of the image to be known, it also doesn't wait for the image to be decoded. Should it also be updated as well?
There's a concern about leaking image decoding time. On one hand,
image.decode()
can leak the same information, however on the other hand,image.decode()
uses a promise, so engines can add arbitrary delays to avoid leaking the same information.We have some related discussions w3c/largest-contentful-paint#111, WICG/element-timing#65
The text was updated successfully, but these errors were encountered: