Its easy to detect Chrome browser and android device, but cannot able to detect Dolphin browser. I have tried the below code:
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
},
Dolphin: function() {
return navigator.userAgent.match(/Dolphin Browser/i);
},
Chrome: function() {
return navigator.userAgent.match(/Chrome/i);
}
};
if (isMobile.Dolphin()) alert('Dolphin');
if (isMobile.Android()) alert('android');
if (isMobile.Chrome()) alert('Chrome');
Since one of the most important features of Dolphin browser is to force Desktop rendering on mobile devices, The Dolphin browser fakes its useragent string, so it is not possible to detect it by JavaScript in reliable way.