Here we will be using $.browser property og jQuery which returns the browser information. In this demo we will test this in most used browsers such as Internet Explorer, Mozilla, Chrome, Opera, etc. I hope you will like this.
Please see this article in my blog here.
NB: Using $.browser is not recommended by jQuery itself, so this feature has been moved to the jQuery.migrate plugin which is available for downloading if the user want. It is a vulnerable practice to use the same. Use it only if needed. It is always better to not use browser specific codes.
Using the code
First thing you need to do is create a page.
- <!DOCTYPE html>
- <html>
- <head>
- <title>Find Browser In JQuery - Sibeesh Passion</title>
- </head>
- <body>
- Find Browser In JQuery - Sibeesh Passion
- </body>
- </html>
- <script src="http://sibeeshpassion.com/content/scripts/jquery-2.0.2.min.js"></script>
- <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
Now you need to write the following script.
- <script>
- $(document).ready(function() {
- if ($.browser.webkit) {
- alert("Hooray WebKit!" + " Version: " + $.browser.version);
- } else if ($.browser.msie) {
- alert("Hooray IE!" + " Version: " + $.browser.version);
- } else if ($.browser.mozilla) {
- alert("Hooray mozilla!" + " Version: " + $.browser.version);
- }
- $.each($.browser, function(i, val) {
- $("<div>" + i + " : <span>" + val + "</span>")
- .appendTo(document.body);
- });
- });
- </script>
- <style>
- div {
- width: 500px;
- border: 1px solid #ccc;
- border-radius: 5px;
- padding: 10px;
- margin: 10px;
- box-shadow: 1px 1px 1px #999;
- color: #f90;
- font-style: oblique;
- text-align: center;
- }
- </style>



Complete Code
- <!DOCTYPE html>
- <html>
- <head>
- <title>Find Browser In JQuery - Sibeesh Passion</title>
- <script src="http://sibeeshpassion.com/content/scripts/jquery-2.0.2.min.js"></script>
- <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
- <script>
- $(document).ready(function() {
- if ($.browser.webkit) {
- alert("Hooray WebKit!" + " Version: " + $.browser.version);
- } else if ($.browser.msie) {
- alert("Hooray IE!" + " Version: " + $.browser.version);
- } else if ($.browser.mozilla) {
- alert("Hooray mozilla!" + " Version: " + $.browser.version);
- }
- $.each($.browser, function(i, val) {
- $("<div>" + i + " : <span>" + val + "</span>")
- .appendTo(document.body);
- });
- });
- </script>
- <style>
- div {
- width: 500px;
- border: 1px solid #ccc;
- border-radius: 5px;
- padding: 10px;
- margin: 10px;
- box-shadow: 1px 1px 1px #999;
- color: #f90;
- font-style: oblique;
- text-align: center;
- }
- </style>
- </head>
- <body>
- Find Browser In JQuery - Sibeesh Passion
- </body>
- </html>
Did I miss anything that you may think which is needed? Have you ever wanted to find out the browser details on client side? Could you find this post useful? I hope you liked this article. Please share me your valuable suggestions and feedback.
Your turn. What do you think?
If you have any questions, then please mention it in the comments section.


Omid NasriPosted Sep 23, 2016, 1:10 PM EDT
Good one
Santhakumar MunuswamyPosted Oct 17, 2015, 11:24 PM EDT
Good one
Sibeesh VenuTOP 100Posted Oct 13, 2015, 8:52 PM EDT
Gowtham K Thanks a lot
Sibeesh VenuTOP 100Posted Oct 13, 2015, 8:51 PM EDT
Gopi Chand Thanks a lot
Sibeesh VenuTOP 100Posted Oct 13, 2015, 8:51 PM EDT
Rakesh Chavda Thanks a lot
Sibeesh VenuTOP 100Posted Oct 13, 2015, 8:49 PM EDT
Mukesh Kumar Thanks a lot
Sibeesh VenuTOP 100Posted Oct 13, 2015, 8:49 PM EDT
Jacob Robinson Thanks a lot
Sibeesh VenuTOP 100Posted Oct 13, 2015, 8:49 PM EDT
Debendra Dash Thanks a lot
Sibeesh VenuTOP 100Posted Oct 13, 2015, 8:48 PM EDT
Nilesh Jadav Thanks a lot
Gowtham KTOP 100Posted Oct 13, 2015, 7:55 AM EDT
Nice Share
Gopi ChandPosted Oct 13, 2015, 7:05 AM EDT
Excellent work Sibeesh
RakeshPosted Oct 13, 2015, 6:24 AM EDT
Good share
Mukesh KumarPosted Oct 13, 2015, 4:32 AM EDT
Good one
Jacob RobinsonPosted Oct 13, 2015, 3:25 AM EDT
Nice One...
Debendra DashPosted Oct 13, 2015, 2:18 AM EDT
good one...
Nilesh JadavPosted Oct 13, 2015, 2:08 AM EDT
Great work sir
Sibeesh VenuTOP 100Posted Oct 13, 2015, 2:07 AM EDT
Rajeesh Menoth Thank you
Sibeesh VenuTOP 100Posted Oct 13, 2015, 2:07 AM EDT
Harshad Pansuriya Thank you
Rajeesh MenothPosted Oct 13, 2015, 1:55 AM EDT
Nice Share!
Harshad PansuriyaPosted Oct 13, 2015, 1:43 AM EDT
Nice one