Click to See Complete Forum and Search --> : autorecognition of site on a PDA


guiman
11-19-2004, 10:02 AM
Hi, can anybody point me in the right direction for some code that I can insert into my HTML headers, that if someone was to access the site using a PDA, it would recognise that it was a handheld device and automatically run the 'text only' version of the site. I hope that makes sense! cheers...

toicontien
11-19-2004, 10:30 AM
<link rel="stylesheet" type="text/css" media="handheld" href="path/to/handheld_stylesheet.css" />

That will cause standards compliant handheld browsers to download a style sheet especially for handheld browsers. Otherwise, use PHP, ASP or JSP and detect the user_agent on the server side to determine which version of your site to send.

The company I work for hosts newspaper web sites, and they have a special handheld compatible template, in addition to the template used by screen browsers.

guiman
11-19-2004, 10:52 AM
thanks for your prompt response. I'll give it a whirl and let you know the outcome..the CSS option looks by far the easiest route! cheers:)