From T119078#1965648: Remove the wbEntity blob on mobile, because it does not allow editing at all.
Related: T125899: Spike: Should the mobile site vary the ParserOutput cache?
From T119078#1965648: Remove the wbEntity blob on mobile, because it does not allow editing at all.
Related: T125899: Spike: Should the mobile site vary the ParserOutput cache?
@Jdlrobson replied:
Hah! Very timely.
https://phabricator.wikimedia.org/T125899I'm pondering the same question. We are keen to lazy load content (references and images) in the mobile web experience for mediawiki.
So it looks like I was right: mobile uses a separate web cache, but shares a parser cache. That makes it tricky to serve a different representation of the content for mobile. See T125899: Spike: Should the mobile site vary the ParserOutput cache?
Quick summary of the investigation:
@daniel I think the blob could be added in OutputPage, since it's a JS variable. (we already add other, user-specific JS vars there like wbUserCanEdit and wbUserIsBlocked)
but yes we should have some caching for the blob.
I suggest to put any data we want to optionally serve into the ParserOutput's extension data slots. That way, the info is cached, but won't get served to the client, unless we explicitly splice it in via an OutputPage hook. We can do the splicing as appropriate for the specific type of client.
We have to be careful though that any distinction we make when constructing the OutputPage from the ParserOutput has to be consistent with how the web cache is split.