From all the reading that I have done, I have understood that using user-agent string is not recommended, as it can be spoofed. Devices can be hindered, etc.
I have
Here's a MSDN magazine article that talks about this subject: No Browser Left Behind: An HTML5 Adoption Strategy.
They mention to use a framework but you can apply techniques explained without it.