[w3c/manifest] Clarification needed for document URL (Issue #1147)

I am updating the manifest member documentation on MDN.

For [`start_url`](https://developer.mozilla.org/en-US/docs/Web/Manifest/start_url), the page currently states:

> A valid `start_url` needs to be same-origin with the document that references the manifest. If `start_url` is unspecified or invalid in any way (such as not a string, not a valid URL, or not a same-origin with the document), the document URL is used.

([change source](https://github.com/mdn/content/pull/34638/files#diff-8b80b39eeb1f196ee72e15584e83e3ffee0dde37936ad139dfe27602c8d08ed5))

However, while updating the page in [this PR](https://github.com/mdn/content/pull/35847/files#diff-8b80b39eeb1f196ee72e15584e83e3ffee0dde37936ad139dfe27602c8d08ed5) (you can [preview the changes](https://pr35847.content.dev.mdn.mozit.cloud/en-US/docs/Web/Manifest/start_url#values)), I am not clear about how to expand/replace/clarify "**document URL**":
  - Is it the URL of the page that links to the manifest file? or
  - Is it the URL of the page from which the app is installed (perhaps this was the case in the past? https://github.com/w3c/manifest/issues/384).

There is not much detail in the specification and I'm trying to gather bits and pieces from old issues in this repo.

### Context
Emphasis is mine:
- https://w3c.github.io/manifest/#understanding-scope

    > If the [scope](https://w3c.github.io/manifest/#dfn-scope) member is missing from the manifest, then the path of the [start_url](https://w3c.github.io/manifest/#dfn-start_url) member is used as a fallback. And if the [start_url](https://w3c.github.io/manifest/#dfn-start_url) member is also missing, then the **_document URL from which the web application is installed_** gets used as the scope. 

- https://github.com/w3c/manifest/issues/669, from the description:

    > the current default for start_url is the **_document URL (the page that referred the user agent to this manifest)_**

### Questions
Are these statements correct:
- If `start_url` is not defined or invalid, then there is no default.
   But would it be correct to assume that the page from which the app is installed is used, though it is not set as the default starting point. What page would open when users click on the app icon?
- If the URL is relative, it is resolved against the manifest file's URL.
- The URL must be same-origin with the page that links to the manifest file.
- The URL must be within the defined `scope`. 

/cc @marcoscaceres @mgiuca : I'd appreciate your insights, thanks

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

Message ID: <w3c/manifest/issues/1147@github.com>

Received on Wednesday, 9 October 2024 23:25:06 UTC