Reading/Web/Projects/Performance/Lazy loading references

Hypothesis
Certain content doesn't necessarily need to be shipped to the user upfront and sometimes not at all. A good example is the list of references. If a mobile user never clicks on a superscript reference link or loads the references section, then they do not make use of the HTML required to generate. We can thus remove this HTML from the initial page load and lazy load it if and when needed.

Progress
We first tested out the impact of stripping references from the HTML in the beta cluster. This suggests for the Barack Obama article in stable we could shave 4.37% off fully loaded time with a 58% reduction in bytes shipped for our HTML.

After some work in building this we enabled on the production cluster in beta on the 28th (after an unsuccessful attempt on the 25th). At this point images were also being lazy loaded. The immediate effect of this was that this reduced the size of the HTML of the page from 154.4KiB to 65.8KiB for the Barack Obama and fully loaded time dropped from 24.34s to 18.82s.

Next steps
We should aim to lazy load references from stable.

First things first we need to verify this does not impact anything else in the cluster given the additional storage it requires.