Background information
Time to first paint is slower on mobile-html than mobile web according to PageSpeed Insights.
Compare mobile-html:
https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fen.wikipedia.org%2Fapi%2Frest_v1%2Fpage%2Fmobile-html%2FDog
to mobile-web:
https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fen.m.wikipedia.org%2Fwiki%2FDog
This was consistent across all pages tested.
What
Speed up page load and time to first paint for mobile-html
How
Investigate suggestions from pagespeed insights, talk to the mobile web team, make recommended adjustments
Completed changes
- Read setup settings and interaction handler from preset JS values and apply margin and theming at the top of the body tag, defer all other changes and apply them after the document loads https://gerrit.wikimedia.org/r/c/mediawiki/services/mobileapps/+/534531
- Minify the pagelib css https://github.com/wikimedia/wikimedia-page-library/pull/244