DEV Community

Discussion on: A simple way to detect if browser is on a mobile device with Javascript

Collapse
 
kak_kotyavo profile image
KAK KOTYAVO!

an interesting solution for new browsers, and most importantly fast:
stackoverflow.com/questions/783868...?

a pity that display media-queries are not available for very ancient devices and browsers (hello Safari)

for server side detect device in production, i use packet npmjs.com/package/node-device-dete... (I'm the author, maybe I'm PR late)

Collapse
 
timhuang profile image
Timothy Huang

Thank you!

Collapse
 
kak_kotyavo profile image
KAK KOTYAVO!

I have made some improvements to the speed of detecting devices and clients, if you also use the library, I recommend updating the dependency to the latest version.

Thread Thread
 
timhuang profile image
Timothy Huang

Great! Thank you!