[w3c/manifest] start_url should be mandatory (#669)

As discussed in #668, the current default for `start_url` is the document URL (the page that referred the user agent to this manifest). That isn't very satisfactory, for a few reasons:

1. It means the app will behave differently depending on which page you installed it from.
2. It means a manifest cannot be interpreted without some document URL pointing at it. This is meaningless when a web app is installed directly through some external means (such as the Microsoft Store), because there was no containing document.

Furthermore, Google Chrome does not let the app be installed if `start_url` is omitted (in violation of the spec).

In order to make the interpretation of the manifest a function of only the manifest (and not dynamic factors like "what page the user was on when they installed this app"), the `start_url` default needs to change, to either:

1. Nothing, making `start_url` mandatory, or
2. `/` (the root of the site), or
3. `.` (the containing directory of the manifest). I think this makes the most sense, because then a manifest "/myapp/manifest.json" has a default start URL of "/myapp/" and a default scope of "/myapp/".

While `.` makes the most sense, it breaks forwards-compatibility with current implementations (new manifests taking advantage of the new default will not work in current-generation user agents). Making it mandatory seems the most compatible option.

However, I noticed this line in the spec:

> Please note that the [start URL](https://www.w3.org/TR/appmanifest/#dfn-start-url) is not necessarily the value of the `start_url` member: the user or user agent could have changed it when the application was added to home-screen or otherwise bookmarked.

So that makes it a little awkward to make `start_url` mandatory, if technically it is a "hint" which the UA can ignore. I still think it makes sense for it to be mandatory that the site supply a "default" `start_url`, even if the user or user agent can override it.

-- 
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/669

Received on Friday, 4 May 2018 06:04:11 UTC