Optimize website loading and eliminate layout shifts - #89
Merged
Merged
Conversation
Documentation previewThe preview has been removed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Dev Notes index downloaded full-resolution PNGs for thumbnails, including both theme variants of the featured hero. In the same cold Chromium measurement, local image downloads fall from 7.30 MB to 56 KB (99.2% less); the featured light hero is now about 12 KB.
The documentation build generates responsive WebP variants with native
srcset/sizes, intrinsic dimensions, asynchronous decoding, lazy body images, and compressed video posters. SVGs retain their vector sources and receive intrinsic dimensions. Original full-size links and published Markdown remain intact. Initial palette selection prevents downloading hidden theme variants, system fonts remove external font requests, and transcript data/DOM construction waits until the reader approaches the viewer or opens a source link.The site-wide audit also removes three sources of visible movement: the Dev Notes filter toolbar appearing after load, unfiltered cards flashing on shared filter links, and unsized SVG heroes/diagrams. The transcript viewer reserves its responsive frame during loading and model switches; collapse and no-JavaScript behavior remain available. Fixes use standard image attributes and CSS layout, with no new client-side framework or measurement controller.
Validation:
git diff --checkpassed.Generated image variants are not committed. Browser checks remain on demand, outside CI. Byte measurements and profiling are local, not production-latency guarantees; deterministic browser checks block external avatars and embeds.