而不在Android中的浏览器中打开

而不在Android中的浏览器中打开

本文介绍了target ="_ blank"链接在PWA中打开,而不在Android中的浏览器中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个也是PWA的网站.

I have a website which is also a PWA.

如果我将PWA添加到我的设备(Android)中,然后返回浏览器(Chrome,Android的最新可用版本),则无论如何,带有target="_blank"的链接都将在PWA中打开.

If I add the PWA to my device (Android) and then go back into the browser (Chrome, latest available version for Android), the links with target="_blank" will open in the PWA, no matter what.

我知道这可能是一个特例,但是如果我想确保浏览器链接将在浏览器而不是PWA中打开?

I know this could be a corner case, but what if I want to be sure that browsers links will be open in browser and not in the PWA?

iOS行为正常...

iOS behaves correctly...

推荐答案

在manifest.json中设置一个范围,该范围确定将在PWA中打开哪些链接以及在浏览器中打开哪些链接:

In manifest.json you set a scope, which determines which links will open in the PWA and which will open in the browser:

PWA清单中的范围参数

这篇关于target ="_ blank"链接在PWA中打开,而不在Android中的浏览器中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 15:59