Browse - Programming Tips - How can I detect which browser the user is using?

Date: 2010jul22
Language: javaScript
Platform: web
Keywords: agent

Q.  How can I detect which browser the user is using?

A.  Access navigator.userAgent like this:

function isIE() { return navigator.userAgent.indexOf('MSIE') >= 0; } function isFirefox() { return navigator.userAgent.indexOf('Firefox') >= 0; }
You can also detect features.