Re: [w3c/manifest] Processing steps for id now removes the fragment (PR #1122)

@mgiuca commented on this pull request.



> @@ -859,13 +858,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
-          already-installed application, it SHOULD be used as a signal that
+          |manifest|["id"] is [=url/equal=] (OPTIONAL: with

The purpose of OPTIONAL here is that some UAs may decide not to do it if they are sure the fragments were already stripped. (e.g. if they always strip fragments before writing them into the database, and there never was a time when they didn't do that, or they ran a migration at some point stripping fragments from the database, then they don't need to exclude fragments here).

Not doing so could actually significantly help those clients, for example, they could then compare the hashes of the app IDs rather than having to perform a URL equals operation (which can't be done using a SQL query). This doesn't only affect major browsers, but also any website that indexes apps -- we'd like it to be optional for them so they can simply assume the fragment-removed app IDs are primary keys in their database and do simple lookups. If we made this mandatory, then _every_ entity that indexes apps would need to have no canonical representation of an app ID, and always do the URL equals excluding fragments comparison.

So I did go back and forth on this a bit, but settled on making it OPTIONAL by way of saying "hey, if you've been storing app IDs with their fragments, you probably should exclude fragments when you compare them, but you don't have to do that if you've treated the data properly per the algorithm, and there are significant simplifications to the data model if you don't do this."

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/pull/1122#discussion_r1593448528
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/manifest/pull/1122/review/2044727664@github.com>

Received on Wednesday, 8 May 2024 06:24:58 UTC