|
640 | 640 | </li> |
641 | 641 | <li>If |scope| is failure, return. |
642 | 642 | </li> |
643 | | - <li>From |scope|, remove the [=url/query=] and [=url/fragment=] |
644 | | - components. |
| 643 | + <li>Set |scope|'s [=URL/query=] and [=URL/fragment=] to null. |
645 | 644 | </li> |
646 | 645 | <li>If |manifest|["start_url"] is not [=URL/within scope=] of |
647 | 646 | |scope|, return. |
@@ -873,13 +872,26 @@ <h3> |
873 | 872 | application, it SHOULD treat that manifest as a description of a |
874 | 873 | distinct application, even if it is served from the same URL as that |
875 | 874 | of another application. When the user agent sees a manifest where |
876 | | - |manifest|["id"] is [=url/equal=] with [=URL serializer/exclude |
877 | | - fragment|exclude fragment true=] to the [=identity=] of an |
| 875 | + |manifest|["id"] is [=url/equal=] (with [=URL/equals/exclude |
| 876 | + fragments=] OPTIONALLY set to true) to the [=identity=] of an |
878 | 877 | already-installed application, it SHOULD be used as a signal that |
879 | 878 | this manifest is a replacement for the already-installed |
880 | 879 | application's manifest, and not a distinct application, even if it is |
881 | 880 | served from a different URL than the one seen previously. |
882 | 881 | </p> |
| 882 | + <aside class="note" title="Excluding fragments is best practice"> |
| 883 | + Since the [=process the id member|processing algorithm=] removes the |
| 884 | + [=URL/fragment=] from the <code>[=manifest/id=]</code> member, it is |
| 885 | + not strictly necessary to [=URL/equals/exclude fragments=] when |
| 886 | + checking for a matching application. However, since old versions of |
| 887 | + this spec (and, possibly, old user agents) did not remove the |
| 888 | + [=URL/fragment=] from the [=URL=] at parse time, and relied only on |
| 889 | + [=URL/equals/exclude fragments|excluding fragments=] during |
| 890 | + comparisons, historical app data could contain [=URL/fragments=] in |
| 891 | + the <code>[=manifest/id=]</code>. Therefore, it is best practice for |
| 892 | + user agents to [=URL/equals/exclude fragments=] even when comparing |
| 893 | + two [=URLs=] that ought not to have fragments. |
| 894 | + </aside> |
883 | 895 | <p class="note"> |
884 | 896 | The [=identity=] can be used by a service that collects lists of web |
885 | 897 | applications to uniquely identify applications. |
|
910 | 922 | <li>If |id| is not [=same origin=] as |manifest|["start_url"], |
911 | 923 | return. |
912 | 924 | </li> |
| 925 | + <li>Set |id|'s [=URL/fragment=] to null. |
| 926 | + </li> |
913 | 927 | <li>Set |manifest|["id"] to |id|. |
914 | 928 | </li> |
915 | 929 | </ol> |
|
949 | 963 | "https://example.com/my-app/#here" |
950 | 964 | </td> |
951 | 965 | <td> |
952 | | - "https://example.com/my-app/#here" |
| 966 | + "https://example.com/my-app/" |
953 | 967 | </td> |
954 | 968 | </tr> |
955 | 969 | <tr> |
@@ -985,6 +999,28 @@ <h3> |
985 | 999 | "https://example.com/foo" |
986 | 1000 | </td> |
987 | 1001 | </tr> |
| 1002 | + <tr> |
| 1003 | + <td> |
| 1004 | + "foo?x=y" |
| 1005 | + </td> |
| 1006 | + <td> |
| 1007 | + "https://example.com/my-app/start" |
| 1008 | + </td> |
| 1009 | + <td> |
| 1010 | + "https://example.com/foo?x=y" |
| 1011 | + </td> |
| 1012 | + </tr> |
| 1013 | + <tr> |
| 1014 | + <td> |
| 1015 | + "foo#heading" |
| 1016 | + </td> |
| 1017 | + <td> |
| 1018 | + "https://example.com/my-app/start" |
| 1019 | + </td> |
| 1020 | + <td> |
| 1021 | + "https://example.com/foo" |
| 1022 | + </td> |
| 1023 | + </tr> |
988 | 1024 | <tr> |
989 | 1025 | <td> |
990 | 1026 | "./foo" |
@@ -1312,8 +1348,7 @@ <h3> |
1312 | 1348 | </li> |
1313 | 1349 | <li>If the [=document=]'s [=document|processed manifest=] is not |
1314 | 1350 | null, and [=document=]'s [=document|processed manifest=]'s id is |
1315 | | - not [=URL/equal=] with [=URL serializer/exclude fragment|exclude |
1316 | | - fragment true=] to |manifest|["id"], return. |
| 1351 | + not [=URL/equal=] to |manifest|["id"], return. |
1317 | 1352 | </li> |
1318 | 1353 | <li>[=Process the `scope` member=] passing |json|, |manifest|, and |
1319 | 1354 | |manifest URL|. |
|
0 commit comments