The only reason to do the detection is if there is a difference. If "Mozilla/5.0"† produces the correct applet (we don't use it for anything else) then that's all we need to know. We don't care if it is Chrome. The problem with browser detection is that it is NOT maintenance free. Instead, for example with the canvas/HTML5 business, we check directly for functionality. The whole "browser detection" thing is not advisable.

Bob

On Tue, Jun 5, 2012 at 3:38 PM, Oliver Stueker <revilo2208@users.sourceforge.net> wrote:


On Tue, Jun 5, 2012 at 12:55 PM, Angel HerrŠez <angel.herraez@uah.es> wrote:
> Ah, yes. I see. Well, MSIE 9.0 reports navigator.userAgent to be "Mozilla", so that takes care of
> that!

Realy? †What fun!
I guess that will break many sniffing javascripts :)


Oh yes, that happens since the dark ages if the browser wars:†

MS Internet Explorer 3.0 UserAgent string is: "Mozilla/2.0(compatible;MSIE3.0;AK;Windows95)"

And even today my Chrome tells me he is:
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5"

It's really no fun write a browser detection. :-/

Oliver

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers




--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900