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

Processing steps for id now removes the fragment #1122

Merged
merged 13 commits into from
Jun 6, 2024
49 changes: 42 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,7 @@ <h3>
</li>
<li>If |scope| is failure, return.
</li>
<li>From |scope|, remove the [=url/query=] and [=url/fragment=]
components.
<li>Set |scope|'s [=URL/query=] and [=URL/fragment=] to null.
</li>
<li>If |manifest|["start_url"] is not [=URL/within scope=] of
|scope|, return.
Expand Down Expand Up @@ -873,13 +872,26 @@ <h3>
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
|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.
</p>
<aside class="note" title="Excluding fragments is best practice">
Since the [=process the id member|processing algorithm=] removes the
[=URL/fragment=] from the <code>[=manifest/id=]</code> 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, historical app data could contain [=URL/fragments=] in
the <code>[=manifest/id=]</code>. Therefore, it is best practice for
user agents to [=URL/equals/exclude fragments=] even when comparing
two [=URLs=] that ought not to have fragments.
</aside>
<p class="note">
The [=identity=] can be used by a service that collects lists of web
applications to uniquely identify applications.
Expand Down Expand Up @@ -910,6 +922,8 @@ <h3>
<li>If |id| is not [=same origin=] as |manifest|["start_url"],
return.
</li>
<li>Set |id|'s [=URL/fragment=] to null.
</li>
<li>Set |manifest|["id"] to |id|.
</li>
</ol>
Expand Down Expand Up @@ -949,7 +963,7 @@ <h3>
"https://example.com/my-app/#here"
</td>
<td>
"https://example.com/my-app/#here"
"https://example.com/my-app/"
</td>
</tr>
<tr>
Expand Down Expand Up @@ -985,6 +999,28 @@ <h3>
"https://example.com/foo"
</td>
</tr>
<tr>
<td>
"foo?x=y"
</td>
<td>
"https://example.com/my-app/start"
</td>
<td>
"https://example.com/foo?x=y"
</td>
</tr>
<tr>
<td>
"foo#heading"
</td>
<td>
"https://example.com/my-app/start"
</td>
<td>
"https://example.com/foo"
</td>
</tr>
<tr>
<td>
"./foo"
Expand Down Expand Up @@ -1312,8 +1348,7 @@ <h3>
</li>
<li>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.
</li>
<li>[=Process the `scope` member=] passing |json|, |manifest|, and
|manifest URL|.
Expand Down
Loading