Yes, I occasionally utilize this JavaScript code to verify browser compatibility.
var isIE6 = false /*@cc_on || @_jscript_version < 5.7 @*/
var isIE7 = (document.all && !window.opera && window.XMLHttpRequest && navigator.userAgent.toString().toLowerCase().indexOf('Trident/4.0') == -1) ? true : false;
var isIE8 = (navigator.userAgent.toString().toLowerCase().indexOf('trident/4.0') != -1);
var isIE9 = (navigator.userAgent.toString().toLowerCase().indexOf('trident/5.0') != -1);
var isSafari = (navigator.userAgent.toString().toLowerCase().indexOf("safari") != -1) && (navigator.userAgent.toString().toLowerCase().indexOf("chrome") == -1);
var isFirefox = (navigator.userAgent.toString().toLowerCase().indexOf("firefox") != -1);
var isChrome = (navigator.userAgent.toString().toLowerCase().indexOf("chrome") != -1);
var isAndroid= (navigator.appVersion.toString().indexOf("Android", 0)!=-1)
var isMobileSafari = ((navigator.userAgent.toString().toLowerCase().indexOf("iphone")!=-1) || (navigator.userAgent.toString().toLowerCase().indexOf("ipod")!=-1) || (navigator.userAgent.toString().toLowerCase().indexOf("ipad")!=-1)) ? true : false;
In your JavaScript code, utilize these variables with appropriate if statements.