user-agent is most definitely needed. My server gives different content depending on which kind of client accesses the page and I certainly don't want to do that in javascript.
Browser sniffing simply doesn't work and only brings you pain. Enough so that jquery abandoned the practice a year ago; http://docs.jquery.com/Release:jQuery_1.3