Skip to content
Advertisement

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

How to check using javascript if the user visiting my website is doing so using Xiaomi’s native – Mi Browser.

Advertisement

Answer

Look at the useragent

console.log(navigator.userAgent.indexOf(" Mi ") != -1 ? "MI":"Not MI")
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement