Is there a way to distinguish a real mobile device from a device emulated by Google Chrome? Please note that Google Chrome can emulate Useragent, touchscreen, screen resolution and accelerometer. I need to know some features which cannot be emulated but can be detected by javascript.
有没有一种方法可以区分真正的移动设备和谷歌Chrome模拟的设备?请注意,谷歌Chrome可以模拟Useragent、触摸屏、屏幕分辨率和加速度计。我需要知道一些不能被模拟但可以被javascript检测到的特性。
1 个解决方案
#1
4
It is possible to check for navigator.plugins.length. Mobile browsers have no plugins, so navigator.plugins.length is equal to 0; Desktop browsers ordinary have plugins, so we can distinguish browsers by length of plugins array.
可以检查navigator.plugins.length。移动浏览器没有插件,因此navigator.plugins。长度等于0;桌面浏览器通常都有插件,所以我们可以通过插件数组的长度来区分浏览器。
#1
4
It is possible to check for navigator.plugins.length. Mobile browsers have no plugins, so navigator.plugins.length is equal to 0; Desktop browsers ordinary have plugins, so we can distinguish browsers by length of plugins array.
可以检查navigator.plugins.length。移动浏览器没有插件,因此navigator.plugins。长度等于0;桌面浏览器通常都有插件,所以我们可以通过插件数组的长度来区分浏览器。