i'm building a quick prototype and i did optimize it only for Chrome. I'd like to detect all the browser, but chrome, so i can display an alert message about performance etc..
what's the best way to achieve this?
i'm building a quick prototype and i did optimize it only for Chrome. I'd like to detect all the browser, but chrome, so i can display an alert message about performance etc..
what's the best way to achieve this?
Use
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
Then you can have an alert
if(!is_chrome){
//display an alert
}
Source: this question