And to try to make this a full answer; first I find it necessary to repeat
the earlier warning, browser detection can be faulty:
https://developer.mozilla.org/En/Browser_Detection_and_Cross_Browser_Support


I don't think it can be stated enough, well written CSS that comes from well
planned and standards compliant development standpoint can save you from
needing browser detection. A lot of cross-browser issues can be remedied by
finding the fault in the CSS that is causing it. Usually due to inheritance
issues, *Gasp* developing from an IE point of view, and the final main
bugger is the browser developers themselves. It is their product and as such
they have the right to have it interpret HTML and CSS they way they see fit.



Here are some good references for JavaScript based browser detection
http://www.quirksmode.org/js/detect.html#string 
http://www.quirksmode.org/blog/archives/2006/07/browser_detect.html  

One caveat - The new version of Opera 10 for Windows (haven't tested Mac or
Mini yet) shows a new addition to the userAgent string - Version. So if you
print out the navigator.userAgent you will see both Opera/9.8 and
Version/10.01. 

Not sure why they have done this and this helps drive home the point of NOT
using browser detection. You cannot know what developers might change or add
and this can break your sites and cause you a lot of work down the road.

Additional references here
http://www.webreference.com/tools/browser/javascript.html 
http://www.hallmarcwebsites.com/brow.html (view source)

Marc Hall
HallMarc Websites
610.446.3346
www.HallMarcWebsites.com 

 

__________ Information from ESET Smart Security, version of virus signature
database 4613 (20091116) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to