lucy24 - 6:12 pm on Apr 10, 2013 (gmt 0)
If you have user-agent detection you also need a way for the user to override user-agent detection. They may disagree with your judgment, or they're using a device your code doesn't recognize. (Although frankly if it's a completely unfamiliar UA you can probably assume it's a cell phone ;))
Don't know about the rest of youse, but I have NEVER met a web site that was designed to be narrower than my personal viewing preference. Well, except when I tried my credit union's mobile app on my iPad and got something obviously intended for cell phones. It looked comical, but worked perfectly well.
If you work by detecting viewport width it doesn't have to happen all at once. Bit by bit as the viewport gets narrower you change different elements.