简体   繁体   English

强制外部链接(来自我的网站)在该设备的默认浏览器中的新标签页中打开?

[英]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? 是否可以强制外部链接到Facebook或Instagram或任何其他应用程序(使用WebView)在该设备的默认浏览器中打开?

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. 用户并不一定总是存放在该应用程序的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. 这是设备默认浏览器中的angularjs和php移动友好网页。

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" />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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