Hi Mike,

It's best to detect from the server side in my opinion. If you have administrator rights to the server you could use something like the Apache Mobile Filter (http://www.apachemobilefilter.org/Apache_Mobile_Filter/Welcome.php).

Regards,

Grant Bailey

On 7/01/2011 3:10 PM, Mike Kear wrote:

I have to convert a client site to enable phone users to use the site and I was wondering what is the best method to detect the mobile user agent and switch the css sheet?

As far as I have seen, there are a few ways to do this - which is best? (or maybe the way to put it is 'least bad')

[A] a link at the top of the normal page, linking to a mobile version of the page. (yuk)

[B] javascript detection (but there are thousands of mobile devices to detect. YUK )

[C] Use CSS @media handheld (but many mobile phones don't support the handheld media type )

[D] server side detection using CGI.User_Agent (but there are so many user agents to detect)

[E] screen resolution detection  (but is that reliable?)

Are there any other ways to do this?

How do the rest of you handle serving pages to both computer screens and mobile device screens??

Cheers

Mike Kear

Windsor, NSW, Australia

Adobe Certified Advanced ColdFusion Developer

AFP Webworks

http://afpwebworks.com

ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************

Reply via email to