Skip to content

Let user agents process a manifest for a document with no manifest link, and choose the display mode - #1255

Open
marcoscaceres wants to merge 5 commits into
w3c:mainfrom
marcoscaceres:app-context-without-manifest
Open

marcoscaceres wants to merge 5 commits into
w3c:mainfrom
marcoscaceres:app-context-without-manifest

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Closes #1168

Lets a user agent process a manifest for a page that has no manifest link: the page's URL stands in for the manifest URL and the body is empty, so every member takes its default. An app that the browser makes without a manifest can then be an application context, and the browser can choose the app's display mode instead of browser.

This change (choose at least one, delete ones that don't apply):

  • Adds new normative recommendations or optional items

Implementation commitment (delete if not making normative changes):

Commit message:

Let user agents process a manifest for a document with no manifest link, and choose the display mode

A user agent can now process an empty manifest for a document that does not link one and choose the app's display mode, so an application context can exist without a manifest file.


Preview | Diff

A user agent can now process an empty manifest for a document that does not link one, so an application context can exist without a manifest file.
@benfrancis

benfrancis commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Hi @marcoscaceres, thanks for taking a stab at addressing #1168.

I see how this technically provides a workaround for applying the manifest processing algorithm without a manifest, but what does that actually achieve? What is the use case?

If the use case is "installing" a website without a manifest, as I said in #1168 (comment) all this achieves is that a user can create an app launcher with no name and no icon which opens a URL in a browser tab. "Applying" the resulting default manifest (as shown below) to a browsing context surely just has no effect?

{
  "dir": "auto",
  "start_url": "https://example.com/foo/bar.html#baz",
  "id": "https://example.com/foo/bar.html",
  "scope": "https://example.com/foo/"
  "display": "browser",
  "icons": [],
  "shortcuts": []
}

How is this "installing" a website in any practical way?

If creating an installed app from a website without a manifest is now a use case for the Manifest specification (which seems nonsensical to me, but OK), I think the only way to fulfil that requirement is to define HTML fallbacks for at least some of the manifest members. Otherwise surely it's just useless in practice?

@benfrancis

Copy link
Copy Markdown
Member

I also note this is kind of pulling the opposite direction to the draft Web Install specification (which I realise you don't agree with), which proposes to make document URL optional by using manifest URL as document URL. This is going to get very complicated.

@marcoscaceres marcoscaceres changed the title Let user agents process a manifest for a document with no manifest link Let user agents process a manifest for a document with no manifest link, and choose the display mode Oct 21, 2026
Comment thread index.html
A [=document=] can also have no manifest link. The user agent MAY
still [=processing a manifest|process a manifest=] for that
[=document=], passing its [=Document/URL=] as both |document
URL:URL| and |manifest URL:URL|, an empty [=byte sequence=] as

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can manifest URL be null? since it's never actually referenced in the algorithm with no json, it shouldn't matter?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if, instead of calling this out this way, we create a 'note' section saying what the processed manifest looks like for an example page with no manifest link.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's recheck all this against the HTML machinery... we might not need any of this at all if it's duplicating what HTML already does.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding of section 4.6.8.11 of the HTML specification is that if a page does not contain a <link rel=manifest> element then nothing happens at all. User agents only use "the first link element in tree order whose rel attribute contains the token manifest".

With no such link, there is no el, no fetch, no response, and therefore no document URL, manifest URL, bodyBytes or client for manifest processing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but eventually it ends up back at our spec, which is the correct hook for not needing a "link rel=manifest"... we are just filling in the blanks.

Comment thread index.html
still [=processing a manifest|process a manifest=] for that
[=document=], passing its [=Document/URL=] as both |document
URL:URL| and |manifest URL:URL|, an empty [=byte sequence=] as
|bodyBytes|, and its [=relevant settings object=] as |client|.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of empty body bytes, can we shortcircuit the fetch here by saying if manifest url is null, then the json is empty, and not fetch at all?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The new definition of "installable web application" is inconsistent with the normative text of the specification

3 participants