A while back we introduced `display: none` [1] to hide content in the DOM rather than stripping it from the HTML output.
We of course never measured the impact of this.
I'd like to propose we explore this avenue again in a controlled manner.
Given the navbox element can account for around 12% [1] this could be causing issues.
Hypothesis: Reducing the unnecessary HTML we send down the wire has more benefits than the extra cost on parsing and stripping newly saved content.
To measure:
* When a cookie is set / query string parameter is passed / for a given page strip any selector in this selector from the DOM before sending. Run tests on different connection speeds and report the difference in time to first paint under these two conditions.
There is evidence here: https://phabricator.wikimedia.org/T119797#1899560
[1] https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/skins.minerva.content.styles/hacks.less#L17