Use media queries. If you change your output depending on the user agent, you have to disallow proxy caches, and even caching in local static files will become unnecessary hard. And don’t forget to send a header Vary: User Agent – this will slow down your site loading times in every browser.