quran / quran.com-frontend

quran.com frontend
https://quran.com
MIT License
998 stars 361 forks source link

It's got some PWA'ism to it, but it doesn't prompt to install. #975

Open Ominira opened 6 years ago

Ominira commented 6 years ago
naveed-ahmad commented 6 years ago

AsSalam o Alakim brother, please feel free to take this :) we had another issue related to service worker and PWA but not sure why @mmahalwy closed it. Related https://github.com/quran/quran.com-frontend/issues/894

mustafa0x commented 6 years ago

Chrome DevTools says: "Site cannot be installed: the page does not work offline".

mmahalwy commented 6 years ago

@naveed-ahmad reopened. we should have service workers on staging no? I don't have a ton of experience with it :(

naveed-ahmad commented 6 years ago

@mustafa0x that's because service worker isn't catching anything. We need to implement the offline first approach. Workbox is perfect candiate for us.

@mmahalwy yes, we'll have same service worker and manifest on staging and production. But we'll need to configure service worker on staging to only cache static assets and api calls for staging.quran.com.

We didn't have ssl on staging when we added manifest etc, but now its time to finally finish this feature :)

Empty SW: https://staging.quran.com/quran-service-worker.js Manifest: https://staging.quran.com/manifest.json

Resources we need to cache:

Ominira commented 6 years ago

Alright.