Skip to content

Commit

Permalink
Clarify resolution and default of URL-related manifest members (mdn#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena authored and evelinabe committed Jul 5, 2024
1 parent 9dc7287 commit 3ff4145
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions files/en-us/web/manifest/id/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ browser-compat: html.manifest.id

The `id` member is a string that represents the _identity of the web application_ — the unique identifier for the web application. If the web application ID does not match an existing ID, the application will be treated as a unique identity even if it is from the same URL.

A valid `id` needs to be same-origin with `start_url`. If the `id` is a relative URL, it is resolved using the origin of [`start_url`](/en-US/docs/Web/Manifest/start_url). The fragment is always ignored.

If the `id` is unspecified or invalid in any way (such as not a string, not a valid URL, not same-origin with `start_url`), the `start_url` is used.

> **Note:** The `id` member can be used to uniquely identify applications. The `id` member is processed like a `start_url` but can be out of [scope](/en-US/docs/Web/Manifest/scope) because it does not point to a resource that can be navigated to.
## Examples
Expand Down
4 changes: 3 additions & 1 deletion files/en-us/web/manifest/scope/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ browser-compat: html.manifest.scope

The `scope` member is a string that defines the navigation scope of this web application's application context. It restricts what web pages can be viewed while the manifest is applied. If the user navigates outside the scope, it reverts to a normal web page inside a browser tab or window.

If the `scope` is a relative URL, the base URL will be the URL of the manifest.
A valid `scope` needs to allow [`start_url`](/en-US/docs/Web/Manifest/start_url) to be in scope. If the `scope` is a relative URL, the base URL will be the URL of the manifest. The query and fragment of the URL are always ignored.

If `scope` is unspecified or invalid in any way (such as not a string, not a valid URL, or causes `start_url` to be out of scope), the `start_url` is used, with its last path segment removed.

## Examples

Expand Down
2 changes: 2 additions & 0 deletions files/en-us/web/manifest/start_url/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ browser-compat: html.manifest.start_url

The `start_url` member is a string that represents the _start URL of the web application_ — the preferred URL that should be loaded when the user launches the web application (e.g., when the user taps on the web application's icon from a device's application menu or homescreen).

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.

> **Note:** The `start_url` member is purely advisory, and a user agent may ignore it or allow the user to alter it at install time or afterwards.
## Examples
Expand Down

0 comments on commit 3ff4145

Please sign in to comment.