在JavaScript中检测iPhone Xr和iPhone Xs

时间:2018-11-05 14:22:47

标签: iphone resolution fingerprint

我有一个指纹Javascript javascript,可以检测iPhone的屏幕尺寸,操作系统和芯片。

例如: Mozilla / 5.0(iPhone; CPU iPhone OS 11_4,如Mac OS X) available_resolution = 667,375 苹果公司〜苹果A11 GPU

问题是,iPhone Xs Max和iPhone Xr具有我所看到的相同分辨率,相同的操作系统和相同的Apple芯片。所以我怎么看iPhone Xs Max和iPhone Xr之间的区别。

1 个答案:

答案 0 :(得分:0)

尝试window.devicePixelRatio-我在浏览器堆栈上测试了这两个设备,XS Max返回3,XR返回2

在我的应用中,我像这样使用它

789789,Archive 9 BASES II,f,HydroCare,066900,Belgium,211500,Chem CMI,066900,CIS (Commonwealth of Independent States)

456456,Ammonium Citrus Esther,f,SupraTex Chem Analysis, 475000, Nigeria,814600,Chem Sensory,129475,MEA (Middle East and Africa)

123123, Shelf Life Test,f,Other,066900,Germany%%% Poland%%% Spain%%% France,2810200,Chem CMI,066900,Europe%%% APAC%%% North America