Search code examples
javascriptmobiledesktop

Easiest way to determine if user is on mobile device


I'm showing a notification bar on my website, and frankly, it doesn't work well when its on a mobile device. I'd like to show the bar ONLY for desktop users.

What is the easiest way to determine if a user is on desktop or on mobile?


Solution

  • Check this http://detectmobilebrowsers.com/

    Work for Javascript, jQuery etc.