All this time we were told 'browser detection is bad', yet... the only real way to give optimal experiences for mobile is... 'browser detection'.
All this time we were told 'browser detection is bad', yet... the only real way to give optimal experiences for mobile is... 'browser detection'.
In practice, browser detection is usually necessary, no way around it. Thinking about writing HTML5 audio functionality? Guess what, every browser implements it differently, and you just have to detect the browser so you know whether to respond to the 'ended' event or the 'pause' event, or whether calling load() before playing is necessary, or will crash a certain mobile browser. (I could go on about 100 more things.)
So, in an interview, always explain that browser detection is bad. Once you're hired, you'll find that most reasonably complex sites use it out of necessity.
This also completely contradicts what I thought was the entire point of the article.
Or as I get a lot, you use a non-standard but standards-compliant browser and then have to spoof the user agent of one of the major browsers to persuade the site to actually use the features your browser has.