4 ms·
Letting the server pick means you're serving the user agent, rather than the device capabilities. Letting the client pick means perceptual performance degradati
by cheald 13y ago
Letting the server pick means you're serving the user agent, rather than the device capabilities. Letting the client pick means perceptual performance degradation, as the client has to synchronously download and run Javascript before it can figure out what to request from the server (that is, the render/layout thread can't be chewing on the CSS while your Javascript is doing its thing). Given how well text compresses and the cost of a HTTP connection, I'm not sure that separating things out is going to get you much of a win.
The comparison to GWT is hilarious, since GWT is a massive mess of dependency hell that ends up requiring an insane amount of support code for any particular small feature.
- modarts 13y agoThe GWT thing threw me off as well. How maintaining a separate stylesheet per user agent could possibly be seen as an optimal approach is beyond me.
- EGreg 13y agoIf you have an iPhone, would you rather have a stylesheet that has everything and the kitchen sink in it (for tablets and desktop environments, all the -firefox- stuff and IE hacks) or would you rather have a stylesheet just for the iPhone? Similarly, would you serve the full jQuery to an iPhone or would you serve the new jQuery without IE dependency which is much lighter? Heck, you might even be able to serve Zepto!