Store offline full page with dependencies (images, js, css)
Closed, ResolvedPublic

Description

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.
jgupta created this task.May 24 2016, 12:01 PM
obogdan renamed this task from Storage to Store offline full page with dependencies (images, js, css).Jun 9 2016, 5:59 PM
obogdan updated the task description. (Show Details)
obogdan updated the task description. (Show Details)Jun 9 2016, 6:01 PM

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 !!

jgupta closed this task as Resolved.Jul 24 2016, 6:01 PM

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 !!