Viral Shah Viral Shah - 1 year ago 231
Javascript Question

How to get browser's name client side?

Is there any object/method that will give me information on the browser, client side?

For example, I need to detect IE browser. I am using:

function st_IsIE()
if(navigator.appName.indexOf("Microsoft Internet Explorer") != -1)
return true;
return false;

Is there a better way?

Answer Source

EDIT: Since the answer is not valid with newer versions of jquery As jQuery.browser is deprecated in ver 1.9, So Use Jquery Migrate Plugin for that matter.

Original Answer


jQuery.browser and jQuery.browser.version

is your way to go...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download