From 09ee6fd090be352e8328c4c06e5fd816f34554b7 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Mon, 6 May 2024 14:13:50 +1000 Subject: [PATCH 01/12] (unrelated) more formal language to set scope's query and fragment to null. --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index b2e7c25c..e38ffce3 100644 --- a/index.html +++ b/index.html @@ -626,8 +626,7 @@

  • If |scope| is failure, return.
  • -
  • From |scope|, remove the [=url/query=] and [=url/fragment=] - components. +
  • Set |scope|'s [=URL/query=] and [=URL/fragment=] to null.
  • If |manifest|["start_url"] is not [=URL/within scope=] of |scope|, return. From d96b2473470af581ff0a782aabd0aa850db30d36 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Mon, 6 May 2024 14:14:13 +1000 Subject: [PATCH 02/12] id processing: Set fragment to null in the processor. Update and add examples. --- index.html | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index e38ffce3..a99103da 100644 --- a/index.html +++ b/index.html @@ -895,6 +895,8 @@

  • If |id| is not [=same origin=] as |manifest|["start_url"], return.
  • +
  • Set |id|'s [=URL/fragment=] to null. +
  • Set |manifest|["id"] to |id|.
  • @@ -934,7 +936,7 @@

    "https://example.com/my-app/#here" - "https://example.com/my-app/#here" + "https://example.com/my-app/" @@ -970,6 +972,28 @@

    "https://example.com/foo" + + + "foo?x=y" + + + "https://example.com/my-app/start" + + + "https://example.com/foo?x=y" + + + + + "foo#heading" + + + "https://example.com/my-app/start" + + + "https://example.com/foo" + + "./foo" From 2bbb99b7d5ca01ec21c6e0ce3b57203956585fd5 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Mon, 6 May 2024 14:14:53 +1000 Subject: [PATCH 03/12] Do not exclude fragments when comparing the manifest id with the document manifest id. Since these are both processed in real time (not from a database) there is no need to exclude fragments here. --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index a99103da..71cd3c25 100644 --- a/index.html +++ b/index.html @@ -1321,8 +1321,7 @@

  • If the [=document=]'s [=document|processed manifest=] is not null, and [=document=]'s [=document|processed manifest=]'s id is - not [=URL/equal=] with [=URL serializer/exclude fragment|exclude - fragment true=] to |manifest|["id"], return. + not [=URL/equal=] to |manifest|["id"], return.
  • [=Process the `scope` member=] passing |json|, |manifest|, and |manifest URL|. From 6814169a6d3875a50f181cb260aabf6a726fa464 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Mon, 6 May 2024 14:15:11 +1000 Subject: [PATCH 04/12] Properly link to exclude fragments. --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 71cd3c25..50a69e7b 100644 --- a/index.html +++ b/index.html @@ -858,12 +858,12 @@

    application, it SHOULD treat that manifest as a description of a distinct application, even if it is served from the same URL as that of another application. When the user agent sees a manifest where - |manifest|["id"] is [=url/equal=] with [=URL serializer/exclude - fragment|exclude fragment true=] to the [=identity=] of an - already-installed application, it SHOULD be used as a signal that - 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"] is [=url/equal=] with [=URL/equals/exclude + fragments=] set to true to the [=identity=] of an already-installed + application, it SHOULD be used as a signal that 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.

    The [=identity=] can be used by a service that collects lists of web From 04a8f5266c5f2c65a36fe6c2954e699cb2c286a3 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Mon, 6 May 2024 14:15:34 +1000 Subject: [PATCH 05/12] Added note about why we still exclude fragments when comparing to the app database. --- index.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/index.html b/index.html index 50a69e7b..119e3ad3 100644 --- a/index.html +++ b/index.html @@ -865,6 +865,19 @@

    a distinct application, even if it is served from a different URL than the one seen previously.

    +

    + Since the [=process the id member|processing algorithm=] removes the + [=URL/fragment=] from the [=id=] member, it is not + strictly necessary to [=URL/equals/exclude fragments=] when checking + for a matching application. However, a database of installed + applications can contain old or erroneous data. In particular, old + versions of this spec (and therefore possibly old versions of user + agents) did not remove the [=URL/fragment=] from the [=URL=] at parse + time, and relied only on [=URL/equals/exclude fragments|excluding + fragments=] during comparisons. Therefore, we ask that user agents + continue to [=URL/equals/exclude fragments=] when comparing against + their existing app database. +

    The [=identity=] can be used by a service that collects lists of web applications to uniquely identify applications. From 70792c0e650629f6addccc3ab26186ca6892f548 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Mon, 6 May 2024 14:41:19 +1000 Subject: [PATCH 06/12] Rewrote the exclude fragments note, and made exclude fragments optional. If it's just about old data, it should be up to the UA to know whether that old data might exist. --- index.html | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 119e3ad3..fe2ea18d 100644 --- a/index.html +++ b/index.html @@ -858,25 +858,25 @@

    application, it SHOULD treat that manifest as a description of a distinct application, even if it is served from the same URL as that of another application. When the user agent sees a manifest where - |manifest|["id"] is [=url/equal=] with [=URL/equals/exclude - fragments=] set to true to the [=identity=] of an already-installed - application, it SHOULD be used as a signal that 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"] is [=url/equal=] (OPTIONAL: with + [=URL/equals/exclude fragments=] set to true) to the [=identity=] of + an already-installed application, it SHOULD be used as a signal that + 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.

    Since the [=process the id member|processing algorithm=] removes the [=URL/fragment=] from the [=id=] member, it is not strictly necessary to [=URL/equals/exclude fragments=] when checking - for a matching application. However, a database of installed - applications can contain old or erroneous data. In particular, old - versions of this spec (and therefore possibly old versions of user - agents) did not remove the [=URL/fragment=] from the [=URL=] at parse - time, and relied only on [=URL/equals/exclude fragments|excluding - fragments=] during comparisons. Therefore, we ask that user agents - continue to [=URL/equals/exclude fragments=] when comparing against - their existing app database. + for a matching application. However, since old versions of this spec + (and, possibly, old user agents) did not remove the [=URL/fragment=] + from the [=URL=] at parse time, and relied only on + [=URL/equals/exclude fragments|excluding fragments=] during + comparisons, there may be historical app data with [=URL/fragments=] + in the [=id=]. Therefore, it is best practice for user + agents to [=URL/equals/exclude fragments=] even when comparing two + [=URLs=] that should not have any fragments.

    The [=identity=] can be used by a service that collects lists of web From 2540edf31a7a2a8e2440026b508a74a514b3af6d Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Fri, 10 May 2024 11:02:26 +1000 Subject: [PATCH 07/12] Fix id link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index fe2ea18d..cb233e5f 100644 --- a/index.html +++ b/index.html @@ -867,7 +867,7 @@

    Since the [=process the id member|processing algorithm=] removes the - [=URL/fragment=] from the [=id=] member, it is not + [=URL/fragment=] from the [=manifest/id=] member, it is not strictly necessary to [=URL/equals/exclude fragments=] when checking for a matching application. However, since old versions of this spec (and, possibly, old user agents) did not remove the [=URL/fragment=] From 03f8c65247597bae9412b009dd57ce4216309431 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Fri, 10 May 2024 11:03:24 +1000 Subject: [PATCH 08/12] Fix id link --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index cb233e5f..53131629 100644 --- a/index.html +++ b/index.html @@ -874,7 +874,7 @@

    from the [=URL=] at parse time, and relied only on [=URL/equals/exclude fragments|excluding fragments=] during comparisons, there may be historical app data with [=URL/fragments=] - in the [=id=]. Therefore, it is best practice for user + in the [=manifest/id=]. Therefore, it is best practice for user agents to [=URL/equals/exclude fragments=] even when comparing two [=URLs=] that should not have any fragments.

    From 11ff7cb3566cab56b0d80420409f64130e48b2c6 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Wed, 22 May 2024 17:26:56 +1000 Subject: [PATCH 09/12] Tidy. --- index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 53131629..d76b8e0b 100644 --- a/index.html +++ b/index.html @@ -867,16 +867,16 @@

    Since the [=process the id member|processing algorithm=] removes the - [=URL/fragment=] from the [=manifest/id=] member, it is not - strictly necessary to [=URL/equals/exclude fragments=] when checking - for a matching application. However, since old versions of this spec - (and, possibly, old user agents) did not remove the [=URL/fragment=] - from the [=URL=] at parse time, and relied only on + [=URL/fragment=] from the [=manifest/id=] member, it is + not strictly necessary to [=URL/equals/exclude fragments=] when + checking for a matching application. However, since old versions of + this spec (and, possibly, old user agents) did not remove the + [=URL/fragment=] from the [=URL=] at parse time, and relied only on [=URL/equals/exclude fragments|excluding fragments=] during comparisons, there may be historical app data with [=URL/fragments=] - in the [=manifest/id=]. Therefore, it is best practice for user - agents to [=URL/equals/exclude fragments=] even when comparing two - [=URLs=] that should not have any fragments. + in the [=manifest/id=]. Therefore, it is best practice + for user agents to [=URL/equals/exclude fragments=] even when + comparing two [=URLs=] that should not have any fragments.

    The [=identity=] can be used by a service that collects lists of web From 12829367d438261a681cd97436a5f212a1314f38 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Wed, 22 May 2024 17:32:47 +1000 Subject: [PATCH 10/12] Respond to review (non-normative phrasing). --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index d76b8e0b..43b0211c 100644 --- a/index.html +++ b/index.html @@ -865,7 +865,7 @@

    application's manifest, and not a distinct application, even if it is served from a different URL than the one seen previously.

    -

    +

    Since the [=process the id member|processing algorithm=] removes the [=URL/fragment=] from the [=manifest/id=] member, it is not strictly necessary to [=URL/equals/exclude fragments=] when @@ -873,10 +873,10 @@

    this spec (and, possibly, old user agents) did not remove the [=URL/fragment=] from the [=URL=] at parse time, and relied only on [=URL/equals/exclude fragments|excluding fragments=] during - comparisons, there may be historical app data with [=URL/fragments=] - in the [=manifest/id=]. Therefore, it is best practice - for user agents to [=URL/equals/exclude fragments=] even when - comparing two [=URLs=] that should not have any fragments. + comparisons, historical app data could contain [=URL/fragments=] in + the [=manifest/id=]. Therefore, it is best practice for + user agents to [=URL/equals/exclude fragments=] even when comparing + two [=URLs=] that ought not to have fragments.

    The [=identity=] can be used by a service that collects lists of web From 9ac3a95dea418ceb0a714d10f5caf69a32651123 Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Wed, 22 May 2024 17:33:49 +1000 Subject: [PATCH 11/12] Rewrite OPTIONAL. --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 43b0211c..5722a782 100644 --- a/index.html +++ b/index.html @@ -858,9 +858,9 @@

    application, it SHOULD treat that manifest as a description of a distinct application, even if it is served from the same URL as that of another application. When the user agent sees a manifest where - |manifest|["id"] is [=url/equal=] (OPTIONAL: with - [=URL/equals/exclude fragments=] set to true) to the [=identity=] of - an already-installed application, it SHOULD be used as a signal that + |manifest|["id"] is [=url/equal=] (with [=URL/equals/exclude + fragments=] OPTIONALLY set to true) to the [=identity=] of an + already-installed application, it SHOULD be used as a signal that 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. From 86c8d94890d7ff63149e7589503e8c18bf4b1805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Fri, 7 Jun 2024 08:44:53 +1000 Subject: [PATCH 12/12] Apply suggestions from code review --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 8444f8d3..41141077 100644 --- a/index.html +++ b/index.html @@ -879,7 +879,7 @@

    application's manifest, and not a distinct application, even if it is served from a different URL than the one seen previously.

    -

    +

    The [=identity=] can be used by a service that collects lists of web applications to uniquely identify applications.