Javascript examples for Browser Object Model:Navigator
detect mobile safari browser
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from www. j a v a2 s. c om*/ var ua = navigator.userAgent; if (ua.match(/(iPod|iPhone|iPad)/) !== null && ua.match(/AppleWebKit/) !== null && ua.search('CriOS') < 0) { console.log("You are using Mobile Safari!"); } else { console.log("Whatever this is, it's not Mobile Safari..."); } } </script> </head> <body> </body> </html>