Skip to content

[Web Install] App Downloads tied to Installation #1092

@DanielHerr

Description

@DanielHerr

Currently the story around PWA installation and offline access is a bit weird, and I would assume confusing for many users. On most platforms installing a PWA is just adding a shortcut and is not related to working offline or otherwise downloading or caching app assets. Web developers can choose to download app files when the page first loads, when the PWA is "installed" (in Chromium), when the user interacts with custom download/cache UI, etc. This is somewhat akin to the traditional way of installing apps on Windows, where each application has its own different installation/download process. That method has rightfully been considered inferior in terms of user experience to the model of application stores and their 1 (or few) click install and download. In the typical app store model, installation and download of core app code and assets are a single unified operation, creating consistency and thus perceived reliability.

The Web install API represents an opportunity to bring this improved user experience to PWAs. Of course, some PWAs are online only and may not want to download or cache anything as part of installation, so such a hypothetical alteration to WI should be optional but encouraged for web devs. It seems to me that the current installation URL model could be easily reused. The core and most important requirement is to provide a standardized way for the PWA being installed to report download progress to the installer. Installation would then be delayed until the download has finished. This could perhaps be done similar to how service workers handle fetch and sw install with an event which waits until work is finished. Providing a way to report download size ahead of time would also be important, but I'm not sure if that would be better placed with install API or a manifest value.

As for the download itself, that could be handled in a few ways. It could be left to the PWA, which could use background fetch where supported and use regular fetch and a custom notification otherwise. Alternatively Web Install could define its own method, perhaps an extension to background fetch, which could automatically provide progress notifications with the PWA's name, icon, and such.

You could argue that this paradigm could be deferred to a future v2 of the API. While true, I believe that would be unfortunately missing out on the improvement to the user experience provided by a standardized coupling of installation and downloading of PWAs.

As an aside, perhaps install URL should also be added to the manifest. This would enable automatic PWA downloads when syncing across devices, for example.

Metadata

Metadata

Assignees

Labels

Web Install APIImperative install for web apps from a web page.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions