Once upon a time, browser detection was the stock-in-trade of JavaScript programmers. Now we use feature detection, because the important thing is whether the browser supports a particular feature, not what browser that is.
But feature detection isn't completely reliable either — there are times when it fails. So let's take a look at some examples, and see what we can do to solve each case.