简体   繁体   中英

Force external links (from my website) to open in a new tab within the default browser for that device?

if I have a mobile-friendly website (not an App). Is it possible to force external links to Facebook or Instagram or any other App (that uses WebView) to open in the default browser for that device?

I'd like the user experience on mobile to be as close as possible to the desktop experience. But certain apps hijack the links. And the user isn't always deposited on the appropriate destination page in that app's Webview. Instead, they sometimes land on an "upgrade" or "offer" page for that App - with no way to navigate to the intended destination.

Again - my own platform isn't a mobile app. It's a angularjs and php mobile-friendly webpage within the default browser for the device.

Is there any code I can insert (either globally or around each individual link) to force external links (from my website) to open in a new tab within the default browser for that device?

Thanks in advance.

在Facebook的情况下,我们可以直接使用fb://

<a href="fb://link.com/" rel="alternate" target="_blank" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM