Some None Ie Browsers Are Showing True For Ie6 Browser Detection
Solution 1:
Don't use browser detection. Feature detection is much nicer. And if you want to display a message or something to only IE 6 users, I would recommend using conditional comments instead.
<!--[if IE 6]>
<script type="text/javascript">
// do something...
</script>
<![endif]-->
Solution 2:
From jQuery Documentation
The $.browser property is deprecated in jQuery 1.3, and its functionality may be moved to a team-supported plugin in a future release of jQuery....
It is always best to avoid browser-specific code entirely where possible. The $.support property is available for detection of support for particular features rather than relying on $.browser.
Altenatively you can use:
- Write custome browser detector using navigator object
- IE conditional statements, something like this
Solution 3:
Thanks all to helped me find what I was looking for, maybe this might help others
var ie6 = $.browser.msie && parseInt($.browser.version) === 6 && typeofwindow['XMLHttpRequest'] !== "object";
if(typeofdocument.body.style.maxHeight === "undefined" && ie6) {
alert('Your browser is IE6');
}
Solution 4:
You can use this:
<!--[If IE 6]> Your code here <![endif]-->
will target IE6 only.
http://www.unintentionallyblank.co.uk/2006/09/19/if-internet-explorer-then-do-something-else-a-how-to/
Solution 5:
if you want a line of script to find IE6 and below and you can't use conditional comments:
if('\v'==='v' && !window.XMLHttpRequest) { // do something... }
Post a Comment for "Some None Ie Browsers Are Showing True For Ie6 Browser Detection"