如何确保页面在浏览器或 Captive Portal 中运行?仅通过 javascript 方法

问题描述 投票:0回答:0

对于ios平台,我们可以这样通过userAgent中的“safari”字段来判断

enter image description here

但是对于android平台,我做不到!我有一些使用“localStorage”或“fetchApi”进行检查的方法,但在某些安卓设备上,它不起作用。

enter image description here

那么,如何确定页面是在浏览器中运行还是在强制门户中运行?

javascript android html lan captiveportal
© www.soinside.com 2019 - 2024. All rights reserved.