navigator.userAgent :- How to detect browser using JavaScript

When you need to check which browser you are currently working on,
You can achieve it using simple javascript.

alert('navigator.userAgent');

If you are using Mozilla Firefox, you will get :-

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13

If you are using Opera,you will get :-

Opera/9.64 (Windows NT 5.1; U; en) Presto/2.1.1
Advertisements

I like to hear from you about this !!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s