Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

web progressive app, service workers , why not? #608

Closed
ATouhou opened this issue Jan 20, 2017 · 9 comments
Closed

web progressive app, service workers , why not? #608

ATouhou opened this issue Jan 20, 2017 · 9 comments

Comments

@ATouhou
Copy link

ATouhou commented Jan 20, 2017

Assalamu aleykoum.
Have you considered making a web progressive app with service workers?
Since it's revolving around an API, it seems like a no-brainer to initiate that, as soon as there is ressources for it and sync it with the web frontend?
And service workers and storing page images after first loading them unless hash is differentiating seems like the way to go?
What do you guys think?

@naveed-ahmad
Copy link
Contributor

@ATouhou +1 for PR :)

@mmahalwy
Copy link
Contributor

+1

@mmahalwy
Copy link
Contributor

I think it'd be great to store surahs since that's the homepage. Let's wait till v3 api

@ATouhou
Copy link
Author

ATouhou commented Jan 22, 2017

The app itself would not have to be updated so often, if the statics already comes shipped, but checks on server if, the server has a newer version or not.
Also we would have an app, that have all the ressources collected at one place

@mahmoudfelfel
Copy link

Any updates here, is there anyone working on this?
I can start working on it, it is straight forward with this webpack plugin https://github.com/goldhand/sw-precache-webpack-plugin
By default, it uses a cache-first strategy where it will cache all the assets so the second load will be almost instant, and whenever we have a new update it will download the new assets in the background and use them for the next visit of the website.
We can start with caching the assets for a better load time, then later start caching even the actual data with a network-first caching, so it will try to hit the network first but if the user is offline, it will fallback to the cached data.

@ATouhou
Copy link
Author

ATouhou commented Feb 3, 2017

Serviceworker:
It should just use the cacheFirst, then meanwhile get the real feed from the API. If the data is not the same (maybe version number or checksum) then there could be a little prompt saying "Site has updated, do you want to reload? " then reload the page (with js) dynamically or just reload the page dynamically and seamlessly without the prompt
PWA:
Add the HTML for PWA, then we have an offline-first version of the site available as an "app"

@mahmoudfelfel
Copy link

@ATouhou the sw-precache webpack plugin handles the versioning of the sw file.
And let's make it on steps as you're saying, first cache the assets to make the second visit quicker, then store the data itself from the API to have a full offline version.
Will start working on it, and open a PR soon Insha'a Allah.

@mmahalwy
Copy link
Contributor

mmahalwy commented Feb 9, 2017

@mahmoudfelfel please take it! Would love your help and I don't have much knowledge in this.

@agungsb
Copy link

agungsb commented Jun 28, 2017

I see that the service worker has been registered to the application, but the progressive web application feature is not working properly. Is this issue still opened? If yes, I would love to help by opening a PR soon. In syaa' Allah.. 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants