Closed rviscomi closed 2 years ago
Background image not preloaded, not discoverable?
This is an interesting case. The metric evaluates to not discoverable because there is no src or srcset on the page set to that image URL. But lcp_resource.initiator.type
is "parser"
so it seems to be discoverable? That might only be the case because the CSS is in an inline style block, haven't tested it with an external stylesheet. Should we drop the discoverable field and always check the initiator type?
For my own knowledge - does the fact that the full HAR data is added give us the info we need here?
Background image not preloaded, not discoverable?
This is an interesting case. The metric evaluates to not discoverable because there is no src or srcset on the page set to that image URL. But
lcp_resource.initiator.type
is"parser"
so it seems to be discoverable? That might only be the case because the CSS is in an inline style block, haven't tested it with an external stylesheet. Should we drop the discoverable field and always check the initiator type?
Yeah hopefully that gives us enough metadata to figure it out later in SQL if there were any false negatives. We can analyze the next crawl to see how reliable the discoverable
field is vs initiator.type
.
Progress on #16 https://github.com/HTTPArchive/almanac.httparchive.org/issues/2890
Additional metadata about the LCP element:
is_lcp_discoverable
: boolean whether it was discoverable in the raw HTMLis_lcp_preloaded
: boolean whether it was preloadedboundingClientRect
: dimensions and position of the rendered elementnaturalHeight
,naturalWidth
: intrinsic image dimensionslcp_resource
: full WPT response metadataraw_lcp_element
: node name and attributes of the element in the raw HTMLstyles
: allowlist of computed style prop/value pairs, set tobackground-image
for nowEverything is applicable to images. The
boundingClientRect
will also be available for text-based LCP elements.Tests