How to detect if Xiaomi’s Mi Browser using JS [closed]

Tags: , , ,



How to check if the user is visiting a website using Xiaomi’s native – Mi Browser

Answer

Look at the useragent

console.log(navigator.userAgent.indexOf(" Mi ") != -1 ? "MI":"Not MI")


Source: stackoverflow