iOS Chrome detection
According to Google Developers, the UA string looks like this:
Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3
Where it differs from iOS Safari in that it says CriOS
instead of Version
. So this:
if(navigator.userAgent.match('CriOS'))
Should do it.
if you want simple true/false answer:
if(/CriOS/i.test(navigator.userAgent) &&/iphone|ipod|ipad/i.test(navigator.userAgent)){ return true;}else{ return false;}
Perhaps, you could try:
var os = navigator.platform;
Then handle the os variable accordingly for your result.
You can also loop through each object of the navigator object to help get you more familiarized with the objects:
<script type="text/javascript">for(var i in navigator){ document.write(i+"="+navigator[i]+'<br>');}</script>
As found in this anwser:jQuery/Javascript to detect OS without a plugin?