perf(assets): request module files only near the viewport (1.11.0) #7

Merged
nthxuyen merged 1 commit from perf/load-near-viewport into main 2026-10-31 10:17:22 +01:00
Owner

An inline loader after the module markup adds the stylesheets and scripts when the module comes within 1.5 screens of the viewport, once per page; scripts keep their order; the noscript stylesheet fallback stays. Verified on Excelia staging: no module request with the page, all four files on scroll, carousel styled and sliding, no console errors. PageSpeed mobile 96 / 77 (loaded test machine) / 97 against 94 before.

https://claude.ai/code/session_01HRvkv5pd9HNM1LLPN1gETc

An inline loader after the module markup adds the stylesheets and scripts when the module comes within 1.5 screens of the viewport, once per page; scripts keep their order; the noscript stylesheet fallback stays. Verified on Excelia staging: no module request with the page, all four files on scroll, carousel styled and sliding, no console errors. PageSpeed mobile 96 / 77 (loaded test machine) / 97 against 94 before. https://claude.ai/code/session_01HRvkv5pd9HNM1LLPN1gETc
An inline loader after the module markup adds the stylesheets and scripts when
the module comes within 1.5 screens of the viewport, once per page; scripts keep
their order. The noscript stylesheet fallback stays. Frees about 56 KB from the
first wave of requests on pages where the module sits below the fold.

Claude-Session: https://claude.ai/code/session_01HRvkv5pd9HNM1LLPN1gETc
nthxuyen deleted branch perf/load-near-viewport 2026-10-31 10:17:22 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nthxuyen/review-module!7
No description provided.