Talk:MobileFrontend/Dynamic Sections

Discussion on IRC 20/04/12
MaxSem: jdlrobson, have you seen the section information action=mobileview provides to you? [14:27] MaxSem: it contains all the information about section hierarchy [14:28] jdlrobson: sure.. but I don't want to have to make an initial request to do this [14:28] jdlrobson: so currently I'd load http://m.wikipedia.org/wiki/San%20Francisco with empty sections [14:28] jdlrobson: then I'd have to call the api to find out what the id's of the first level sections are [14:29] jdlrobson: I then on loading a section pass the id found to get its html [14:29] jdlrobson: ideally I don't want to use the api to find out what the first level sections are- I want MobileFormatter.php to annotate the headings with this information so I can just use it straight away [14:29] MaxSem: but you'll need to load the lead anyway, so mobileview gives you the ability to request sections with it [14:29] jdlrobson: yeh but the lead would be provided by the server not the api [14:30] MaxSem: how? [14:30] jdlrobson: well http://www.mediawiki.org/wiki/MobileFrontend/Dynamic_Sections#Proposed_Solution [14:30] jdlrobson: summary = lead [14:31] MaxSem: I object to screen-scraping [14:31] jdlrobson: I'm not screen scraping.. [14:32] MaxSem: no you are - you're proposing an extra infrastructure to load just sections [14:32] MaxSem: also, section titles are unreliable and there may be several section with the same title on the page [14:33] jdlrobson: well we allow editing of individual sections e.g. http://www.mediawiki.org/w/index.php?title=MobileFrontend/Dynamic_Sections&action=edit&section=1 [14:33] jdlrobson: all I'm saying is we would provide a way of loading sections individually [14:33] jdlrobson: e.g. http://www.mediawiki.org/w/index.php?title=MobileFrontend/Dynamic_Sections&section=1 [14:34] jdlrobson: and change the meaning of http://www.mediawiki.org/w/index.php?title=MobileFrontend/Dynamic_Sections on the mobile site to mean load the 'lead text' and links to section headings [14:34] MaxSem: your proposal contains links to sections with names [14:34] jdlrobson: well that was just an implementation suggestion - it could be done via querystring or whatever else makes sense [14:35] Amgine: It can be done via querystring now. [14:35] Amgine: (unparsed) [14:36] jdlrobson: how? [14:36] Amgine: https://www.mediawiki.org/w/index.php?title=MobileFrontend/Dynamic_Sections&section=1&action=raw [14:36] MaxSem: hmm, this proposal has some problems with Varnish purging [14:37] jdlrobson: well this is why I put it on a wiki page.. for discussion of issues [14:37] jdlrobson: Amgine: that link seems to download [14:37] jdlrobson: and is just the wikitext ? [14:38] Amgine: mmm, yah. raw, unparsed. [14:38] MaxSem: MW purges HTTP cache on edits, however if you makeits content available via numerous section links, you have no sane way of purging all those links on edit [14:38] Amgine: (parsoid?) [14:38] jdlrobson: so yeh what I was looking for was a rendered section e.g. http://www.mediawiki.org/wiki/File:MobileFrontendSectionPage.png MaxSem: I'll think of ways to implement this reasonably [14:40] jdlrobson: Cool. It was just the idea I wanted to get across as I think it would be a good first step to a more performant mobile site [14:40] MaxSem: but no annotations in HTML, plz [14:40] MaxSem: [14:40] MaxSem: well, did you mean "mobile site that serves content in smaller chunks"? [14:41] MaxSem: cuz no wai servers will work faster this way [14:41] Amgine: I see a two-step process can do it, but you'll be transferring the content 3x so possibly more expensive in bandwidth. [14:41] jdlrobson: why 3x ? [14:42] jdlrobson: i meant in terms of how much the user downloads - I think currently a typical page is just over 1mb [14:42] Amgine: action=raw -> mobile, mobile -> API:Parsing wikitext, rendered -> mobile. [14:44] jdlrobson: ok i see - but i'd imagine that most visitors would never invoke that as most visitors will have javascript and use the api instead [14:44] MaxSem: Amgine, there's API that returns parsed sections [14:45] Amgine: Oh, then just use that! it'd be silly else. Where is it? MaxSem: Amgine, there's API that returns parsed sections [14:45] Amgine: Oh, then just use that! it'd be silly else. Where is it? [14:46] MaxSem: action=mobileview [14:46] Amgine: Undocumented? [14:49] Amgine: Extension:Mobile Frontend. How odd. [14:55] Amgine: MaxSem: is this new API implemented via MF now, or part of 1.20? [14:55] MaxSem: MF [14:55] Amgine: Thanks!