Fix scope computation when start URL ends in '/' |
|||||
Issue descriptionCurrently the default scope for start URL https://cnet.com/tech-today/ is https://cnet.com https://cnet.com/tech-today/index.html is https://cnet.com/tech-today/ It would be nice if the scope for start URL https://cnet.com/tech-today/ was https://cnet.com/tech-today/
,
Feb 6 2017
Btw, if { "scope": "/" } on https://cnet.com/tech-today/manifest.json then it should become https://cnet.com
{ "scope": "./" on the other hand would become https://cnet.com/tech-today/ as relative urls are relative to the manifest location.
I believe it is currently defined relative to manifest location and not start_url
--
4. Let scope URL be a new URL using value as input and manifest URL as the base URL.
--
> new URL("index.html", "https://i.rocks/manifest/manifest.json").href
< "https://i.rocks/manifest/index.html"
> new URL("/", "https://i.rocks/manifest/manifest.json").href
< "https://i.rocks/"
> new URL("./", "https://i.rocks/manifest/manifest.json").href
< "https://i.rocks/manifest/"
,
Feb 6 2017
This bug is about how we handle scope when the scope is undeclared. I think that Chrome correctly handles scope when scope is declared. Thank you for the w3c spec links
,
Feb 9 2017
,
Feb 21 2017
Issue 694646 has been merged into this issue.
,
Feb 22 2017
I have a fix in progress for this.
,
Feb 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4141e5db756f115ae51c31f71d33d6c3a8422638 commit 4141e5db756f115ae51c31f71d33d6c3a8422638 Author: dominickn <dominickn@chromium.org> Date: Wed Feb 22 23:49:08 2017 Do not drop the final web app scope path component if it ends with a slash. This CL updates the web app scope computation. The current computation drops the final component of the path if there is more than one component. For web apps which have a start URL that ends in a folder, this removes the containing folder, resulting in an overly broad scope. For instance, https://example.com/today/ would end up with a scope over all of https://example.com under this scheme. Instead, we refine the computation by not dropping the final path component if the path ends with a slash. This indicates that the final component is a directory which should be retained. Otherwise, a lack of a slash at the end of the path signals a file, which we remove to extract the containing directory. BUG= 688888 Review-Url: https://codereview.chromium.org/2711563003 Cr-Commit-Position: refs/heads/master@{#452279} [modify] https://crrev.com/4141e5db756f115ae51c31f71d33d6c3a8422638/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java [modify] https://crrev.com/4141e5db756f115ae51c31f71d33d6c3a8422638/chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java
,
Feb 28 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by kenneth....@gmail.com
, Feb 6 2017