naver / egjs-agent

Extracts browser and operating system information from the user agent string or user agent object(userAgentData).
https://naver.github.io/egjs-agent/
MIT License
110 stars 18 forks source link

add isMobile property #14

Closed happyhj closed 7 years ago

happyhj commented 7 years ago

https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent

In summary, we recommend looking for the string “Mobi” anywhere in the User Agent to detect a mobile device.

If the device is large enough that it's not marked with “Mobi”, you should serve your desktop site (which, as a best practice, should support touch input anyway, as more desktop machines are appearing with touchscreens).