Re: [manifest] Integration with service workers (#161)

> Well that would mean that the service worker might not have been installed when the app has been added to the launcher and thus might not work offline until launched second time.

True. But there is no guarantee that an app will ever be installed at all, and the app should work offline regardless (because 1. the UA might not support manifests, and 2. the user declined to install it, but still wants to access the app when offline - for example, the user is on vacation, they visited a restaurant's website, restarted their phone, and now want to view the website but offline). 

In other words, installing an application should never be a precondition for getting offline functionality.  

> With it in the manifest, the UA could make sure that the service worker is installed (which in return could depend on fetching of resources to make offline work etc) when added to the home screen and fail adding it in case the service worker couldn't be installed. 
>
> I think that it makes sense

I agree. It makes sense. But this is predicated on some assumptions that might not hold in practice: the service worker might not actually provide any offline capabilities. The service worker, and its cache, might have been evicted. Having a service worker in the manifest shouldn't grant that service worker any additional rights (or longevity) when compared to a SW declared in script. Otherwise, we will just end up with everyone declaring SWs in the manifest and then problems if the manifest doesn't get used by the UA. 

The more I think about this, the more I want to separate them: I feel like what the manifest provides and what SWs provide are separate concerns.  

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/161#issuecomment-69135163

Received on Thursday, 8 January 2015 04:43:13 UTC