navigator.userAgentData

 I added a check on 'navigator.userAgentData.mobile' as well as searching for 'Mobi' in 'navigator.userAgent'.


But I did not need to, as the high-level browser information will still be in the 'userAgent' string when Chrome reduces the information in the the 'userAgent' string. 


All the information in the old 'userAgent' string can be used to uniquely identify you so Chrome is reducing the information. 


Firefox does not support 'userAgentData'.


Still, 'userAgentData' offers another way of testing for mobiles on Chrome. I do not want to run animations on a mobile even if the mobile has a wide screen and supports the animations. You are really meant to use feature detection and responsive design.


There are more tips at: bbingo.xyz/t

Comments

Popular posts from this blog

webkit-tap-highlight-color in CSS

Steve Jobs quotes