I'd like to add to this. While I am completely behind feature detection as a solution and am using it wherever possible, it is important to realize that feature detection doesn't always identify the ability of the browser to render the VISUAL layout of a page correctly. As an example, take the broken implementation of PNG alpha in IE6. I have a menu system that uses a series of sprites. For quality reasons, I am using a PNG file with alpha transparency, so that the menu icons can render in front of different colored backgrounds.
But I use browser detection to see if the client has IE6, in which case I use a GIF for the sprite background. The quality of the image is not as good, but it is an acceptable solution. Another example is for "zones" in my CMS. I am using the min-width and min-height CSS property while in design mode. These CSS attributes are not supported by IE6, so when I detect that client, I use alternate means to render the design mode. Now, philosophically speaking, is it really correct to abandon browser detection in these circumstances? To my knowledge, there is feature detection will not solve crappy-broken-browser rendering. A few months ago there was a jquery user having troubles animating relatively positioned elements with percentages. {left:"-=25%"} and {left:"+=25%"}, etc. It wasn't working the same in all browsers. The FUNCTION worked, but the rendering on the screen was broken. Would it not be correct to detect the browser and provide an alternate animation to ensure the correct rendering? Or am I missing something? JK -----Original Message----- From: jquery-dev@googlegroups.com [mailto:jquery-...@googlegroups.com] On Behalf Of lrbabe Sent: Sunday, March 29, 2009 11:50 AM To: jQuery Development Subject: [jquery-dev] Re: Detecting IE8 operating in IE7 mode For example VML is broken in many cases in IE8: If you are using percentage units or if the element has been created outside of the document (in a fragment for example) the element is not rendered. It has correct dimensions, correct attributes, but it is not displayed and there is no way to detect it. Feature detection doesn't work in that case and in some other, that's why $.browser.msie/opera/mozilla/version will always remain in jQuery, and that's why I think we should add a parameter that indicates when IE8 is in IE7 mode (VML works in that case). On Mar 5, 8:24 pm, Matt Kruse <m...@thekrusefamily.com> wrote: > On Mar 4, 3:26 pm, lrbabe <lrb...@gmail.com> wrote: > > > I'm aware that jQuery promotes features detection over browser > > sniffing but currently we provide no way for the user to figure out > > easily when the browser is IE8 operating in the so called > > "compatibility mode". > > Why would you need to detect this? What problem are you trying to > solve? > > This is exactly why any type of browser sniffing is inherently error- > prone, and feature-detection strategies should be used instead. > > Matt Kruse --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---