DEV Community

loading...

Discussion on: How to handle outbound links in desktop PWA?

Collapse
ryansmith profile image
Ryan Smith

As others have said, I like the "pseudo-browser". It is a familiar pattern for Android/Chrome users.
Dev PWA

Some apps on Android have the option to open external links in the app or in the external browser, having that choice is a nice feature. But I'm not sure if there is a solution for PWAs to do that easily. Adding a user option may require appending target=_blank to add external links if they have it set to open in an external browser as you mentioned.

Collapse
sn0n profile image
Rob Foraker

But the problem with the integrated popup browser is work flow is interrupted, as you can't cross reference both tabs, as this is blocking everything before it. It's limited in scope,.... But it is enough of an issue, especially for this crowd, where more tabs or windows are a much better option in most instances...

Collapse
zcdunn profile image
Zack Dunn • Edited

But the user always has the option to open that link in a new tab/window, via context menu or middle click. Using target=_blank forces the choice on the user.

EDIT: Also, I think the webview itself has a context menu to open the link in the browser.

Thread Thread
ryansmith profile image
Ryan Smith • Edited

Good tip, I can confirm that I get the following in Chrome on Windows.

  • In the PWA context menu, I can choose to open links in an external browser, private window, etc.
  • In the browser's context menu, I can choose to open DEV.to links in a PWA window.

It seems like the way it functions now does allow for full control.

Edit: Looks like the update to add target="_blank" was made, so the default behavior is an external browser window. 🙁