You may be surprised but user agent string can be faked easily, so a browser can impost any other browser...
For that reason you should not differentiate your site based on browser detection, but based on feature detection...
For instance do no say I support only Chrome and FF, but say I support only browser compiles to standard and has
addEventListener
method...
This approach will open your site for future/updated browsers without any change or any concern about, how the browser called or identify itself...
It also enables you to create different solution for different browsers with ease...
For an easy path you may use
Modernizr: the feature detection library for HTML5/CSS3[
^]
if ( Modernizr.canvas ) {
drawCanvas();
} else {
drawImageFromServer();
}