javascript - Detecting device brand -


i working on web analytics. using javascript client-side , nodejs server-side. know can find out device type using useragent, how detect device brand (client or server side)?

you can't directly; useragent field not contain vendor. can build library of useragent tokens map particular vendors. involve lot of research , testing on wide range of devices, though.

for example, "ios", "iphone" or "ipad" in useragent can safely map "apple". samsung galaxy s3, example, has model number in useragent, "gt-i9300". can map "samsung". ...and you'd need repeat every other device want recognise. looking user agent strings online quickest way.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -