You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 79bed86
Browse filesBrowse the repository at this point in the historyBrowse files
perf(website): paint a loop's poster without waiting for script, and keep video out of the page load
Lighthouse on the captions page, whose first loop sits in the first screen:
the loop's poster is the page's largest paint, and it only appeared once the
bundle had hydrated (859 ms render delay), while a 1 MB clip downloaded
inside the page load. Desktop LCP went from 0.92 s before the loops to 1.26 s.
- The poster is now an <img loading="lazy"> in the server HTML, under the
video: the browser fetches it natively near the viewport, before any
script, and a reader without JavaScript sees it.
- No video source before the window's load event.
Desktop LCP 1.26 s -> 1.11 s, mobile back to the pre-loops figure (4.64 s
simulated against 4.65 s). Preloading the poster at high priority was tried
and dropped: on a throttled phone it pushed LCP to 5.3 s.
0 commit comments