[whatwg] RWD Heaven: if browsers reported device capabilities in a request header (Boris Zbarsky)

Boris, 

fair enough.

Two use-cases off of my head that do not currently have a non-ugly solution and could if browsers reported device class:

1. Adaptive images:
To optimize user-experience on smart-phones (most of which have relatively small screens, and are on slow connections most of the time) we need to send lower-resolution or resized versions of high-resolution images that would be sent to desktop clients. The best way to do it is if markup referred to an image resource with single URL and server, depending on header information, sent different crop or resolution of the image to different classes of devices.

The two underline assumptions here are: it's much easier to detect device type than quality of network connection. It's also more correct because small-screen devices do not need high-def images even if they can download them fast.

2. Adaptive CSS/Javascript.

Most websites use CSS/JS aggregation. Different devices need special CSS/JS code. For instance, touch-screen devices need all kinds of libraries like jqueryMobile. Likewise, Desktop experience may need large javascript libraries that are not needed on smart-phones. If server could easily detect device type/capabilities it would have the ability to tailor aggregated js/css files to a class of a device, thus providing greatly improved experience.

I am sure there are other use-cases that could benefit from improved device type/capability detection. After all, that's exactly why people have put enormous effort in projects like WURFL. Alas, WURFL is not accurate enough or easy enough to use. Hence the motivation for the proposal to ask browsers help with the effort.

Thank you

Irakli 

Received on Monday, 6 February 2012 12:00:45 UTC