Here we are wasting our time.
USER-AGENTS are next to useless, since you can change them. I recommend analyzing the user-agent string on the server side. Using Javascript for that adds to the complexity and introduces another point of FAIL.
Conditional output/functionality depending on browser may sound intriguing, but it's the wrong approach. I would use such distinction if really necessary, say, for the XMLHttpRequest, or for embedding ActiveX vs working technology.
The Navigator object is by far not a modern way. It may be a tried way, but it's been around for years, and not part of the DOM.
If you are writing different sites for different browsers... you should google to find "Morons in Webspace"
view tutorial
Here we are wasting our time.
USER-AGENTS are next to useless, since you can change them. I recommend analyzing the user-agent string on the server side. Using Javascript for that adds to the complexity and introduces another point of FAIL.
Conditional output/functionality depending on browser may sound intriguing, but it's the wrong approach. I would use such distinction if really necessary, say, for the XMLHttpRequest, or for embedding ActiveX vs working technology.
The Navigator object is by far not a modern way. It may be a tried way, but it's been around for years, and not part of the DOM.
If you are writing different sites for different browsers... you should google to find "Morons in Webspace"