Lets say, a PWA is deployed to a sub-directory of a regular website (e.g. https://example.net/app). It uses hash-mode for its navigation (e.g. /app/#/login and /app/#/dashboard).
Now, there are links inside this PWA which leading to the website, e.g. https://example.net/product-list. This link should leave the PWA and open the native default browser of a mobile device.
Therefore we set the scope of our manifest.json to "scope": "https://example.net/app", because these docs say, that everything what leaves the sub-directory should be treated as "outside of scope":
Finally, the following example limits navigation to a subdirectory of the current site:
"scope": "https://example.com/subdirectory/"
Unfortunately that does not work, neither on iOS nor on Android: all links of that domain are is still opened inside the PWAs webview! In detail:
- Click on
https://example.net/app/#/loginfrom a different app (e.g Whatsapp or Slack): expected to open in PWA => that works - Click on
https://example.net/product-listfrom a different app (e.g Whatsapp or Slack): expected to open in default browser, but opens in PWA webview => thats's wrong! - Click on
https://example.net/product-listfrom inside PWA: expected to open in default browser, but opens in same PWA webview => thats's wrong!
What can be the issue here? From our understanding a request to https://example.net/product-list clearly is outside of a scope binded to https://example.net/app
Highly appreciate any clarification on that matter.
PS: also looked into the standard description here, section "Understanding scope", but it is not clearer.
Edit:
Setting the scope to https://app.example.net/ and serve it from that sub-domain is not an option.