The latest and greatest jQuery release no longer uses browser sniffing but jQuery.browser still exists in jQuery 1.3.

What is browser sniffing? It's a simply a method of detecting the user's browser. It's normally done through old school javascript (client-side sniffing) and exists as a feature for some other javascript frameworks as well.

There are several scripts on the internet which would determine the user's browser information:

Script test results
Your browser has been identified as Gecko engine (Mozilla, Netscape 6+ etc.).
Your operating system has been identified as Linux.

jQuery.browser returns my browser information:

Browser info:
version : 1.9.0.6
safari : false
opera : false
msie : false
mozilla : true

User interface developers like myself find sniffing nearly irrelevant. I have this vision that soon enough, Firefox or some modern browser will be the default browser of Windows. But that is a just a dream for now and we have to really deal with Internet Explorer bugs. I usually deal with browser bugs with css only but jQuery is another neat way fixing alignment problems for instance. There are a lot of jQuery plugins which allow you to deal with cross-browser compatibility issues from fixing IE6 box model to creating rounded corners and even achieving fancy stuff like page-peeling (which in my opinion is ridiculous).

Apart from jQuery.browser, we already have jQuery.support which allows you deal with IE headaches. (Is it really just IE? Well, it's the only beast we really need to deal with). Take a look at the jQuery.support documentation for more information.

comments powered byDisqus

Hello! I am Kat. I've been a developer for several years. When I'm not sitting down, reading and working for long hours, I am traveling to some place of interest.
If you want to reach out, you can send me an email or add me up on Google Plus.