Maybe a feature test like this one could be useful: if($.browser.msie){ // IE stuff if(Object.prototype.toString.call(self.JSON) === "[object JSON]"){ // IE8 stuff } else { // IE < 8 stuff } }
rather than a sniff, above code assumes JSON is native only in IE8 or greater and there is no way to obtain the same result with every other IE (or generally speaking every other browser) Hope this helps. Regards On Thu, Mar 5, 2009 at 7: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 -~----------~----~----~----~------~----~------~--~---