I have a spec in my current project that requires us to advise the user which browsers are best to use the web application. If their current browser version they are using is not in our list of "ideal" browsers we want to display a message.
What is the best way to check a specific version of the users browser. I am aware of the following using jQuery but this doesn't help with specific versions.
$(document).ready(function() {
var b = '';
$.each($.browser, function(i, val) {
if (i=='safari' && val==true) { b = 'safari'; }
if (i=='opera' && val==true) { b = 'opera'; }
if (i=='msie' && val==true) { b = 'msie'; }
if (i=='mozilla' && val==true) {b = 'mozilla'; }
});
//Do Something With b, Like $('#dis').html(b);
});
We want to be able to say is your browser Firexfox 2 or greater or IE6 or greater etc?