[w3c/manifest] support "Continue where you left off" and "Open a specific page or set of pages" (#794)

## Previous Work

I really like how I can configure Google Chrome to "Continue where you left off" in chrome://settings/ in the "On startup" section. There is also an option to "Open a specific page or set of pages" which I know some people use.

## Feature Request

I would like to see something similar for PWAs. i.e. I would like a way as a PWA publisher to advise the web browser running my application to reopen previously opened windows when the user reopens the application after previously closing/quitting it (e.g. Command + Q on macOS). This way several windows can be open in my PWA, each with possibly unique URLs, and when the user reopens the application they get those same windows back.

## Examples

One way to support this would be to, in addition to the `start_url` property, support a `start_urls` property which can be set to `"continue"` to advise the browser to "Continue where you left off" or can be set to an array of urls to advise the browser to "Open a specific page or set of pages":

### "Continue where you left off"

```json
{
  "name": "Donate App",
  "description": "This app helps you donate to worthy causes.",
  "icons": [{
    "src": "images/icon.png",
    "sizes": "192x192"
  }],
  "start_url": "index.html",
  "start_urls": "continue"
}
```

### "Open a specific page or set of pages"

```json
{
  "name": "Donate App",
  "description": "This app helps you donate to worthy causes.",
  "icons": [{
    "src": "images/icon.png",
    "sizes": "192x192"
  }],
  "start_urls": ["find-your-cause.html", "manage-payment-options.html"]
}
```

## Impact to the existing `start_url` property

1. The existing `start_url` property would still behave the same for initial loading of the app as long as `start_urls` is not specified as an array of URLs.
1. If both `start_urls` and `start_url` are specified then `start_urls` would take precedence.
1. If `start_urls` is set to `"continue"` then a `start_url` can still be specified to be used in the initial launching of the PWA (although maybe this is not applicable as in order to install a PWA you must first open it in which case maybe it never makes sense to support providing both at the same time).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/794

Received on Monday, 16 September 2019 13:16:31 UTC