4 ms·
If you can do it without adding a bloated JavaScript framework and adding tons of requests to a page load, sure. If you can't do that I'd prefer auto detection
by feld 10y ago
If you can do it without adding a bloated JavaScript framework and adding tons of requests to a page load, sure. If you can't do that I'd prefer auto detection by the load balancer and redirects to the mobile site
- extrapickles 10y agoYou can do a fair amount these days with CSS thanks to flex-box, it handles the row based layout transition to column based quite well. A benefit of using CSS is that it handles browser zoom and high dpi screens much better as you can use units other than pixels (eg: em/rem, vh/vw, %). From a architecture point of view, you want to keep layout logic out of the JavaScript anyways as JS should be for interactions and other 'nice to have' behaviors.
- RobertKerans 10y agoJesus, you don't need frameworks or sniffing, it's an almost all-text site with very minimal styling. It's almost more difficult to make it non-responsive. There isn't anything really on the desktop version that isn't on the mobile, so I'm not sure where those extra requests would be coming from. Sorry for the the tetchy reply, I just find it nuts that, to get around writing maybe a page of CSS, people build and maintain an entirely separate site that has to be in lockstep to the the first, along with ever-reliable sniffing, and then say that is the simpler way to do it. There are several scenarios where it turns.out to be useful; this isn't one of them