I am trying to detect ALL versions of IE by using jquery $.browser.msie
.
It works for 8, 7, 6, but it ignores IE9. Why is that and what is a solution for javascript to detect ie9?
JS version: jQuery JavaScript Library v1.5
As of version 1.9
of jQuery $.browser
is no longer supported. Use jQuery.suport
instead. With this change you'll need to check on what functionality you want to check. So just browser check is no longer supported in it. It is recommended to do a feature check instead of browser check.
Docs here
IE9 can emulate older browsers, causing the variety of "works/doesn't work" responses you see here.
"Trident/5.0" is present in IE9's user-agent string in all modes, according to this SO question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With