- From: Matt Giuca <notifications@github.com>
- Date: Wed, 22 Sep 2021 17:26:46 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/pull/988/review/761511797@github.com>
@mgiuca commented on this pull request. > + </ol> + <aside class="example"> + <p>Below table shows some example cases of the |identity| processing algorithm.</p> + <table class="data"> + <tr> + <th>|json|["id"]</th> + <th>|manifest|["start_url"]</th> + <th>|manifest|["id"]</th> + </tr> + <tr> + <td><i>undefined</i></td> + <td>"https://example.com/my-app/start"</td> + <td>"https://example.com/my-app/start"</td> + </tr> + <tr> + <td>""</td> I think I have a weak preference to agree with @marcoscaceres and treat it as missing (fallback to `start_url`). Overall I think we've gone down a pretty confusing path with this being resolved against the origin but defaulting to `start_url`. Not sure if it's too late to reconsider, but could we actually **resolve it against `start_url`**. Pros: * It just means if it's empty, or missing, it would naturally be equal to `start_url`, without needing a special case for "if it's empty". * It makes it much more important to add a leading '/' to the `id`, to anchor it to the origin. Which is something I've been, on a few other threads, saying we should be recommending anyway, to really make it clear that this is a URL and the '/' makes it unambiguous that it is relative to the origin. Cons: * It means if you don't put a leading '/' on the `id`, if you change the `start_url` your identity will change, which destroys the whole point of having `id`. So that Con doesn't sound great, right? But if we go with "`""` means `start_url`", that Con also applies, in that one special case — if you want the id to be empty you need to remember to write `"/"` rather than `""`. So maybe my suggestion makes sense and it's just quite important to prefix your `id` with `/`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/manifest/pull/988#discussion_r714398508
Received on Thursday, 23 September 2021 00:26:59 UTC