Re: [w3c/manifest] Provide a way to not open a link in the PWA, in the moment (#989)

Found this issue because we have many payment-issues using PayPal and also other payment providers, where the checkout starts inside the PWA but certain login or redirect-urls leaving the scope and opening the browser, where the session can not be continued (probably missing cookies or so)

The `scope` should be everything what we need here - if it would work like [described in docs](https://developer.mozilla.org/en-US/docs/Web/Manifest/scope#examples):
```
Finally, the following example limits navigation to a subdirectory of the current site:
"scope": "https://example.com/subdirectory/"
```

If that would work, it would be an easy solution, because links to shop or product-pages can be just out of PWA scope, to be opened automatically in the default browser, but that seems not possible yet:
- `https://example.com/subdirectory/#/login` opens in PWA because it's in the scope
- `https://example.com/product-list` clicked from inside PWA should open default browser because out of scope

After weeks of digging around, this info came up: "_Theoretically the scope should limit the PWA to only control pages within https://example.com/subdirectory/ and its subdirectories. In reality, the scope doesn't prevent navigation to out-of-scope URLs within the same origin (in this case https://example.com). The browser allows the PWA to navigate to any URL within the same origin, even if it's outside the defined scope_".

Is that true, and if so: why? That totally messes up the concept of having a scope.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/989#issuecomment-2297484095
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/manifest/issues/989/2297484095@github.com>

Received on Monday, 19 August 2024 21:25:34 UTC