Check for mobile device?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


Any best practice in checking mobile device and re-direct them into
mobile page (e.g. wap) ?

E.g. User agent, screen size etc.?

anything else?

Re: Check for mobile device?

howa wrote:

Quoted text here. Click to load it

I'm not a specialist, but the HTTP Accept: header seems to be the best  
place to see what formats the user-agent likes.
It's even pounded with a quality ratio.

Apache's algorithm is a good example of clever content negotiation:

Quoted text here. Click to load it



Re: Check for mobile device?

Quoted text here. Click to load it

Keeping the same data/html, possibly with another stylesheet (check the  
media attribute). Wasn't WAP dead BTW? The only people I know who can  
browse the internet on their phone just have a 'regular browser'.
Rik Wasmus

Re: Check for mobile device?

Rik Wasmus    

Quoted text here. Click to load it

XHTML Mobile Profile is nice and easy to convert from current XHTML

Re: Check for mobile device?

On 9/4/2007 10:16 AM, howa wrote:
Quoted text here. Click to load it

If you plan to "sniff" for user agent, be very careful that you are
checking it correctly.

There are far too many Web sites that do sniffing to distinguish IE from
Firefox from Opera from Safari from etc.  Often, there is no really good
reason for this other than the fact that some non-standard IE capability
has been used that won't work with other browsers.

In the meantime, sniffing for Firefox should actually be for Gecko
(Mozilla's Web rendering engine within Firefox).  When Web sites sniff
specifically for Firefox and not Gecko, those sites often do not display
correctly for SeaMonkey, Camino, and other Mozilla products, all of
which are also using Gecko as does Netscape and more than 20 other
browsers.  If Firefox can properly display a Web page, so should any
other Gecko brower PROVIDING there is poorly implemented sniffing.  See
< for a discussion on Gecko sniffing.

While my rant does not seem to apply to mobile devices, the Minimo
browser for mobile devices uses Gecko.  Thus, my original warning:  Be
very careful!

David E. Ross
< .

Anyone who thinks government owns a monopoly on inefficient, obstructive
bureaucracy has obviously never worked for a large corporation. © 1997

Re: Check for mobile device?

Quoted text here. Click to load it

Don't. Current SotA is that a good fluid design in plain old HTML +
CSS will work fine. Just make sure it's accessible non-JS, the page
size is manageable and that linearization order is sensible. Many
phone with small screens and slow links should be able to navigate
around the menu bar of the first few pages even before the rest of the
page has d/l'ed

Site Timeline