我正在搜索如何检测用户是否通过强制门户访问网站(例如当您连接到 WiFi LAN 并要求登录时),因此我正在尝试破译用户代理字符串,我的访问强制门户时,自己的手机会返回此信息:
mozilla/5.0 (linux; android 7.1.2; vibe k5 plus build/njh47b; wv) applewebkit/537.36 (khtml, like gecko) version/4.0 chrome/61.0.3163.98 mobile safari/537.36
通过普通 Chrome 访问页面时:
mozilla/5.0 (linux; android 7.1.2; vibe k5 plus build/njh47b) applewebkit/537.36 (khtml, like gecko) chrome/61.0.3163.98 mobile safari/537.36
我在 vw
字符串中看到的最大区别,但我在用户代理解释中找不到有关该字符串的任何内容,有人有想法吗?
最佳答案
来自https://developer.chrome.com/multidevice/user-agent :
In the newer versions of WebView, you can differentiate the WebView by looking for the wv field
关于android - "wv"在用户代理字符串上意味着什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47165973/