Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use url equivalence excluding fragments for id comparison #1013

Closed
wants to merge 1 commit into from

Conversation

philloooo
Copy link
Collaborator

@philloooo philloooo commented Oct 11, 2021

The https://url.spec.whatwg.org/#url-equivalence defaults to exclude fragments = false. Clarify in id member that the equality comparison here excludes fragments.


Preview | Diff

this manifest is a replacement for the already-installed
application's manifest, and not a distinct application, even if it is
served from a different URL than the one seen previously.
|manifest|["id"] [=URL serializer/exclude fragment|excluding
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to move this part up to the processing the manifest section.

It should go:

  1. Process the id member passing json, manifest and document URL.
  2. If document's [=processed manifest=] is not null:
    22.1 If [=processed manifest=]["id"] member is not [=url/equal|equals=] with exclude fragment true to |manifest|["id"], then return. (We might need a note here to clarify if anything should happen when there is a mismatch - it's not an error, we just drop the new manifest on the floor).
    22.2 If ???? members have changed, signal to the end user that manifest is a replacement for the already-installed application's manifest.
  3. Let document's processed manifest be manifest.

Now 22.2 might have special rules, like:

  • How do we actually if the manifest has changed? Do we JSON-serialize them and do text comparisons?
  • what happens if the scope changes, and the current page is out of scope?
  • Is there any situation where we can do a silent update? (e.g., only the theme-color changed... my gut feeling is no).
  • If the icons change, do we need to say MUST prompt? What else would should cause a prompt?

Do we need final step "24", that once we have updated the manifest, we need to re-apply the manifest. However, that causes the entire application to reload... what does that mean? Do we need to navigate back to the start URL?

@philloooo
Copy link
Collaborator Author

Merged this to #1011

@philloooo philloooo closed this Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants