Determine if user is on mobile device with Javascript

Posted on November 7, 2017 at 2:55 pm

Easiest way to determine if user is on mobile device with javascript:

if (/Mobi/i.test(navigator.userAgent) == true || /Android/i.test(navigator.userAgent) == true ) {
    // Mobile device detected
}

Other Posts

Updated Posts