Possible Duplicate:
Why is $.browser deprecated – and what is a better alternative?
I have historically used the $.browser property in my jQuery to determine the browser. I found it tremendously helpful and useful.
I also have historically linked to the latest version of jQuery. Like this:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
Well, apparently jQuery 1.9 is out not and the support for this property is REMOVED.
Does anyone know a good jQuery plugin to use as an alternative?
I do know that the recommended method is to use $.support, and I will use that sometimes.
But sometimes it’s just easier to know what browser someone is using.
Can anyone help?
The browser object simply parsed the
navigator.userAgentfor you. You could always parse that yourself if you are so inclined.Nothing stops you from plucking the code from an older JQuery version and then putting that into your own jquery plugin.
The Jquery docs recommend against the browser object and even state that it is vulnerable to spoofing: