If more-or-less correctly identifying between 70-90 % of visitors (dependant on target audience),
sure, javascript/DHTML is propably enough. To get to 95-99%, checking HTTP user-agent would help. Ofcourse it's trivial for a browser/user to either disable or change what the DHTML script or user-agent returns to the server.
http://www.eit.ihk-edu.dk/instruct/browser...php?e=0,7,22,42
http://gemal.dk/browserspy/
http://sourceforge.net/projects/phpsniff/
OTOH, checking which layout engine a users browsers claims to be using is attacking the problem from the wrong side;
instead you should just check whether their browser supports the features you're using on your website, using a combination of DHTML and CSS.
http://www.quirksmode.org/css/contents.html
http://www.webcredible.co.uk/user-friendly...detection.shtml
http://www.westciv.com/style_master/academ...port/index.html
However, even if the browser doesn't think it supports CSS , javascript, frames or tables, you should still at least give the user the choice of going to the page meant for modern browsers. Not only meant for security-conscious/paranoid users who have disabled everything, but also for users of certain mobile browsers, various Amiga and Atari browsers, browsers on 8-bit systems such as C64 (
Contiki) ,
Lynx ,
Dillo