Forum Moderators: open

Message Too Old, No Replies

Detecting Handheld CSS

What's the Best Way to Direct a Browser?

         

cmarshall

3:24 am on Jan 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Okay, I have a site that caters to cellphones.

It has pages that render WML 1.1, WML 2.0 (XHTML-MP) and a Handheld media-specific CSS file.

What I want to do is to ensure that a device hitting the site is directed to the appropriate pages, and that the optimal Content-Type is returned. For example, the whole site validates XHTML 1.1 and I return application/xhtml+xml if the browser can stomach it.

Now, when a cellphone hits it, I check for an accept for WML. If it accepts that, I check for WML 2.0 (XHTML). If it accepts that, I send it to the XHTML-MP renderer. If not, it gets sent to the cWAP renderer.

I'd like to have one more choice. If the handheld can accept XHTML and the Handheld CSS media type, I'd like to send it on to the main site, and trust CSS to do its job and reformulate my site for the handheld.

In a few instances I've tested, this is no problem, as the handhelds I've tested with don't accept WAP, and just go straight to the main site. However, the newer handhelds accept the whole kit and kaboodle, and get sent to the XHTML-MP pages, which is kinda like swimming in the kiddie pool.

I want to figure out the best way to determine if the device can handle the Handheld CSS file. If the device can handle WML, as well as standard XHTML, but can't use the Handheld CSS file, then I don't want it hiting the main site. I'd rather it go to the WML pages. However, the optimal experience is had by the main site, using the refactored pages in Handheld CSS.

What is the best way to direct a client to the choice that leverages its abilities to the max, without sending it to pages it can't render properly?

cmarshall

1:15 pm on Jan 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Boy, I got you guys stumped, huh?

This is a pretty good conversation to have, as more and more mobile devices are coming out.

In my implementation, I have a "restaurant CMS" that has support for cellphones. The menus, phone #, directions and whatnot can be reformulated for WAP or WAP 2.0, including using the WTAI URI scheme to allow the phone to dial the number directly.

I need to do some figuring as to how best to support mobile users. I want people who shelled out the big bucks for their phones to get their money's worth, while still supporting the people with the cheap phones.

cmarshall

4:22 pm on Jan 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I figured this out, but I also figured out I don't want to do it.

WAY too slow.