The user agent is the most safe way to detect correctly the browser, the browser version and it's engine. Feature detection should be made to detect point inconsistencies (if elements has the filter style, if tables accept innerHTML correctly, etc.).
The big problem we had with the old version of detection browser engines was that mozilla removed the method we were using to detect it and it kinda broke the detection. Using the user agent is safer. -- Fábio Miranda Costa front...@globocore *github:* fabiomcosta *twitter:* @fabiomiranda *ramal:* 6410 On Tue, Oct 12, 2010 at 1:43 PM, אריה גלזר <arieh.gla...@gmail.com> wrote: > The reason is that Mootools transferred from feature detection (what you > see in 1.2) to browser user-agent string parsing (that weird regexp stuff). > > > On Tue, Oct 12, 2010 at 4:19 PM, HENG <ourwait...@gmail.com> wrote: > >> Hello everyone: >> >> I am very happy that Mootools 1.3 has released! Thank all the guys in >> Mootools dev Team! Thank you all very much! >> >> I am a Mootools Crazy Boy, because I really like it very much! >> >> Now, I want to ask a question about Mootools. And I hope that Mootools Dev >> Team can give me an answer. Thank you . >> >> Mootools 1.3, Code as follow: >> >> *var ua = navigator.userAgent.toLowerCase(), >> platform = navigator.platform.toLowerCase(), >> UA = >> ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) >> || [null, 'unknown', 0], >> mode = UA[1] == 'ie' && document.documentMode;* >> >> Campare to Mootools 1.2, Code as follow: >> >> *Engines: { >> presto: function(){ >> return (!window.opera) ? false : ((arguments.callee.caller) ? >> 960 : ((document.getElementsByClassName) ? 950 : 925)); >> }, >> trident: function(){ >> return (!window.ActiveXObject) ? false : >> ((window.XMLHttpRequest) ? ((document.querySelectorAll) ? 6 : 5) : 4); >> }, >> webkit: function(){ >> return (navigator.taintEnabled) ? false : >> ((Browser.Features.xpath) ? ((Browser.Features.query) ? 525 : 420) : 419); >> }, >> gecko: function(){ >> return (!document.getBoxObjectFor && window.mozInnerScreenX == >> null) ? false : ((document.getElementsByClassName) ? 19 : 18); >> } >> }* >> >> >> I can Not understand why Mootools change the STYLE that detected the >> Broswer engine..... >> >> In Mootools 1.2, I am really admire the code especially the Broswer >> detect.....We all know, that are not only five broswers all over the world, >> and in China, there are a lot of Broswers based on IE core but use that >> diffierent name. Now, it is deprecated..... >> >> That anyone could give me a reason that can persuade me to accept that new >> code ?? >> >> Thank you.... >> >> I just hope that Mootools will be the best..... >> >> Thank you ..... >> >> >> >> >> -- >> -------------------------------------------------------------------- >> HengZhou >> --------------------------------------------------------------------- >> -- >> >> > > > -- > Arieh Glazer > אריה גלזר > 052-5348-561 > 5561 > >