Although  Fábio M. Costa has given me a reason, I think the way to detect
the broswer should not base on User-Agent....

Detecting by the ability is better by the name.....for example, when I use
Chrome to explorer the web, I can do it like those:

*chrome.exe --user-agent="Mozilla/5.0 (iPad; U; CPU OS 3_2_2 like Mac OS X;
en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B500
Safari/531.21.10"*

It will make Chrome like iPad's safari to explore the web, but the real is
Chrome. It does Not change a bit!

So, I recommand that Mootools should find a way to detect the broswer by the
ability not by the User-Agent.....

All above is my opinion....Thank you....




2010/10/13 Fábio M. Costa <[email protected]>

> 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, אריה גלזר <[email protected]> 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 <[email protected]> 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
>>
>>
>


-- 
--------------------------------------------------------------------
HengZhou
---------------------------------------------------------------------
--

Reply via email to