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.
Inspired by @rviscomi 's work on the main HTTP Archive site in HTTPArchive/httparchive.org#796 I've had a look at this site
We're just missing INP target and also have load issues (likely when content is not cached in CDN as quiet time between issues):
Checking histrorical views it looks like the INP has been better historically so this may be a once off, but would still be nice to get some head room.
Our articles are quite big, especially some of them, so while we've been careful with our JS, we could still look at what other layout improvements we could make.
I've made the following changes:
innerText
totextContent
to prevent reflow as innerText is aware of CSS so requires a style recalc.visibility: hidden
rather thandisplay: none
to prevent shifts/layouts when the buttons are activated by JS. Also add a no js full hide to avoid the gap if buttons aren't activated.moderate
eagerness to improve load times when navigating between chapters. Should also help INP if we can get some of that load layout and JS execution out of the way earlier.I was not able to verify any noticeable improvement in Perf tracing or Lighthouse as these really are micro-optimisations and there's a lot of variability but still worth doing IMHO.