Implement the offline storage feature.
- Save the contents of a page from a hardcoded link as an HTML file.
- Save all the dependencies (images, js, css, etc).
- Update local HTML to point to the local resources.
Implement the offline storage feature.
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | jgupta | T2457 Test WTL API | ||
Resolved | jgupta | T2688 Store offline full page with dependencies (images, js, css) | ||
Resolved | jgupta | T2746 1. Db working from qt | ||
Resolved | jgupta | T2747 2. Store html files and keep track in db | ||
Invalid | jgupta | T2748 3. Store dependencies and keep track |
Discussion with mediawiki API guys on their IRC channel confirmed that API does not provides dependencies like JS and CSS. It only provides HTML.
So what's the current plan to retrieve the dependencies? Does the HTML pulled through the API contain the relevant tags to request those files?
HTML provided by API does not contain relevant tags to request those files .
The HTML that is provided by API is something like this
<p> some text*</p> ( i get body section )
instead of this
<!doctype html>
<head> <link rel= *****> </head> <body> <p> some text </p> </body>
</html>
To retrieve those dependencies , i am looking into Mediawiki / WikiToLearn docs hoping to find something like : resourceLoader HTTP API
So we decided to provide pre-packaged CSS and JS for the application .
Currently i am using hardcoded CSS !!
I got the required CSS from WikiTolearn site .
Source code has all the link rel of the CSS .
I am using those CSS for the app
Conclusion : it gives same look and feel as on the site !!