I know there are a couple of add-ons out there that detect if a user agent is “mobile”.
The Mobile addon for example uses a mobile template if it detects that you are on a “mobile” device.
But this approach seems less than ideal to me.
First of all it seems to assume that a device is either mobile or not. But devices used to access the web range from tiny phone screens to widescreen desktop monitors. It’s a spectrum, there is no cutoff.
If all you do is designate mobile or not then you are using the same template for an iPad as for a phone.
What would be great to have is a plug-in that works like Mobile except instead of user agent sniffing it would use media queries.
You could designate breakpoints based on screen width
width < 320: template A
width > 320 and < 500: template B
Width > 500 and < 900: template C
Width > 900 template D
If you used fluid layouts for the templates then you could have a site that looked good on any device without the need to do UA sniffing.
Am trying to make the transition to responsive web design and somethings like this would help.
I do think that Mobile is on the right track by allowing the use of alternate templates. It allows you to only send markup that will be used and makes it easier to send media files that are smaller than those sent to a desktop screen.
Just think it would be more powerful if based on media queries.
Alas I am no programmer so can’t build addons myself.
Anybody?