Você pode fazer isso de diversas formas ! ## [Javascript puro][1] <!-- begin snippet: js hide: false --> <!-- language: lang-js --> var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "Other"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "Unknown"; }, searchString: function (data) { for (var i = 0; i < data.length; i++) { var dataString = data[i].string; this.versionSearchString = data[i].subString; if (dataString.indexOf(data[i].subString) !== -1) { return data[i].identity; } } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index === -1) { return; } var rv = dataString.indexOf("rv:"); if (this.versionSearchString === "Trident" && rv !== -1) { return parseFloat(dataString.substring(rv + 3)); } else { return parseFloat(dataString.substring(index + this.versionSearchString.length + 1)); } }, dataBrowser: [ {string: navigator.userAgent, subString: "Chrome", identity: "Chrome"}, {string: navigator.userAgent, subString: "MSIE", identity: "Explorer"}, {string: navigator.userAgent, subString: "Trident", identity: "Explorer"}, {string: navigator.userAgent, subString: "Firefox", identity: "Firefox"}, {string: navigator.userAgent, subString: "Safari", identity: "Safari"}, {string: navigator.userAgent, subString: "Opera", identity: "Opera"} ] }; BrowserDetect.init(); document.write("você está usando <b>" + BrowserDetect.browser + "</b> na versão <b>" + BrowserDetect.version + "</b>"); <!-- end snippet --> Veja esse exemplo com a função acima <!-- begin snippet: js hide: true --> <!-- language: lang-js --> var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "Other"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "Unknown"; }, searchString: function (data) { for (var i = 0; i < data.length; i++) { var dataString = data[i].string; this.versionSearchString = data[i].subString; if (dataString.indexOf(data[i].subString) !== -1) { return data[i].identity; } } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index === -1) { return; } var rv = dataString.indexOf("rv:"); if (this.versionSearchString === "Trident" && rv !== -1) { return parseFloat(dataString.substring(rv + 3)); } else { return parseFloat(dataString.substring(index + this.versionSearchString.length + 1)); } }, dataBrowser: [ {string: navigator.userAgent, subString: "Chrome", identity: "Chrome"}, {string: navigator.userAgent, subString: "MSIE", identity: "Explorer"}, {string: navigator.userAgent, subString: "Trident", identity: "Explorer"}, {string: navigator.userAgent, subString: "Firefox", identity: "Firefox"}, {string: navigator.userAgent, subString: "Safari", identity: "Safari"}, {string: navigator.userAgent, subString: "Opera", identity: "Opera"} ] }; BrowserDetect.init(); if (BrowserDetect.browser === "Chrome") { $("body").css('background','lightblue'); } <!-- language: lang-html --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <body> </body> <!-- end snippet --> ## [Jquery][2] $( "p" ).html( "versão: <span>" + $.browser.version + "</span>" ); if ( $.browser.msie ) { alert( $.browser.version ); } ## [modernizr][3] Uma outra alternativa, seria utilizar o modernizr para determinar os recursos disponíveis no Browser do cliente. [1]: http://codepen.io/isvaldo/pen/ZYxKrw [2]: http://api.jquery.com/jQuery.browser/ [3]: http://tableless.com.br/utilizando-a-biblioteca-modernizr/