Adam Baso and I experimented yesterday with creating a single standalone
Special page that could act as a single page web application for mobile web
that could in future be used to package Firefox OS and Chrome store apps as
well as provide the basis for an offline version of Wikipedia.
For the initial proof of concept it simply allows a reading and searching
experience that uses JavaScript. The left menu currently has one item due
to the lack of a way to do login via JavaScript.
I've just finished the changes required on the MobileFrontend side:
https://gerrit.wikimedia.org/r/100919
It also requires a core change to allow skins to add attributes to the HTML
tag
https://gerrit.wikimedia.org/r/100920
This patch also provides manifest.php which could be packaged in core or
inside MobileFrontend.
Adam and I have been backing and forthing with manifest.php but a gist of
my current version [1] can be found below which is compatible with the
MobileFrontend change (Adam please make note of how I do cache control in
the manifest and how $styleModules now works and incorporate these changes
into your version)
To do:
1) We need to generate a cache manifest version which reflects the current
state of the skin and the resource loader modules - startup and styles so
that it updates when changes have been made.
2) For this to completely work offline we need to find a way to cache the
request for mediawiki and jQuery that the startup module RL module fires
off (sample url [2]). Once we find a way of doing this, the great work Ori
has been doing with localStorage to cache resource loader modules will mean
that the entire page will work without JavaScript (exciting stuff)
Would be interested in any help moving this along - I think this is a great
opportunity for innovation in Wikipedia's mobile offerings!
[1]
https://gist.github.com/jdlrobson/7921828
[2]
/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20131212T200640Z
load.php?debug=false&lang=en&modules=startup&only=scripts&skin=mobile&target=mobile&*:17