Re: routing based on browser width

Matt Jones
Mon, 07 Sep 2009 15:04:51 -0000

On Sep 6, 12:51 am, dansinker
<dansin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> I have a site that''s directed toward mobile use. As a result, the
> basic structure consists of pages that render exclusively on mobile
> devices, and then corresponding pages for desktop browsers that
> explain that they need to come back on a mobile device.
>
> Currently, I''m using Javascript on the mobile page to detect
browser
> width and then it redirects to the desktop page if it''s above
480px
> wide.
>

This seems like an ultimately doomed strategy - the 480px limit you''re
using is exactly met by the iPhone, the G1 and the Pre (in landscape),
and exceeded by the Kindle. Then there''s the much-rumored "iPhone
tablet", which will completely exceed that if it ever appears.

It would seem more logical to either just show the pages to everybody,
or to detect user agents as others in the thread have suggested.

--Matt Jones