demo · v132

Where does the link open?

An installed PWA with a launch_handler. Pick where the link is clicked, see whether it opens in the browser or hands off to the app, plus the exact navigate-existing vs focus-existing vs auto semantics.

result:

full decision matrix

client_modeapp not runningsame URL runningdifferent URL running
autolaunch new app windowfocus existingfocus existing, navigate to new URL
navigate-existinglaunch new app windownavigate-existing (focus + go to URL)navigate-existing
focus-existinglaunch new app windowfocus existing, no navfocus existing, no nav (URL stays old!)
navigate-newlaunch new app windowopen second app windowopen second app window

manifest example

{
  "name": "Mail",
  "start_url": "/",
  "display": "standalone",
  "launch_handler": {
    "client_mode": "navigate-existing"
  }
}

see also