The beta version of the mobile site currently defers the loading of references. When a reference is tapped or the reference section (which is initially closed) is opened we make a call to the API to get the reference section. [[ https://en.m.wikipedia.org/wiki/Special:MobileCite/740641055 | A special page fallback ]] is provided for users without JavaScript.
This change looks like it would save our Russian users alone [[ https://www.mediawiki.org/wiki/Lazy_loading_of_references_on_Russian_Wikipedia | 123.37 terabytes a year ]].
The API requested used to pull references dynamically is:
https://en.m.wikipedia.org/w/api.php?action=mobileview&format=json&page=Barack+Obama§ions=references&prop=text&revision=740641055
The problem with this is that this API query is slow. It relies on memcached to work and given the low usage of references usually it works with a cold cache.
I'd be interested in porting this to restbase similar to how you have /remaining and /lead there would also be a third endpoint /references which would only return references sections.
I'd suspect this would be beneficial to apps users as well so lets collaborate on making an API that would help us all.
MobileFrontend when configured would use Restbase instead of the MobileFrontend API. I see this as a worthwhile activity to allow the mobile site access to Restbase.