PDA

View Full Version : Different skins automatically



David Jameson
2004-12-06, 20:20
Is there a way to make the SlimServer use a different browser template based
on what device connects to it?

The regular multi-framed template is fine when accessing from a desktop
browser but sucks with a PDA (by the way, it crashes the Palm PDA)

The "handheld" template is fine for PDAs but is not really the best approach
when you're on the desktop.


Seems to me that it needs to be possible to control the template based on a
tuple (user, user-agent)

a) The user (so multiple users can have their own set of templates)
b) The user-agent (so that the template changes automatic based on the
browser used by a particular user)


D

--
_______

Jack Coates
2004-12-06, 20:52
> Is there a way to make the SlimServer use a different browser template
> based
> on what device connects to it?
>

use a different URL: e.g. http://server:9000/Fishbone/,
http://server:9000/Handheld/.

> The regular multi-framed template is fine when accessing from a desktop
> browser but sucks with a PDA (by the way, it crashes the Palm PDA)
>
> The "handheld" template is fine for PDAs but is not really the best
> approach
> when you're on the desktop.
>
>
> Seems to me that it needs to be possible to control the template based on
> a
> tuple (user, user-agent)
>
> a) The user (so multiple users can have their own set of templates)
> b) The user-agent (so that the template changes automatic based on the
> browser used by a particular user)
>

Fancy :) It'd be neat, but I'd be concerned about its ability to detect
and parse all the goofy user-agent strings it'd get. It's gonna get hit
with at least Windows, Linux, Mac, Palm, WinCE and Symbian clients, and
the browser wars are starting to heat up again.

--
Jack At Monkeynoodle.Org: It's A Scientific Venture...
"Believe what you're told; there'd be chaos if everyone thought for
themselves." -- Top Dog hotdog stand, Berkeley, CA

David Jameson
2004-12-07, 19:44
OK - didn't realise I could do that but of course it makes sense.

>
> use a different URL: e.g. http://server:9000/Fishbone/,
> http://server:9000/Handheld/.
>




We do this with our enterprise anti-spam software and it's quite
straight-forward.
We look for a couple of substrings in the UserAgent that would indicate
Palm, or
PocketPC, and a few other special devices - all the mainstream browsers tend
to
include the Mozilla compatible value (I forget what it is offhand) so that's
fine.

A couple of regular expressions will deal with it easily.

D



> Fancy :) It'd be neat, but I'd be concerned about its ability to detect
> and parse all the goofy user-agent strings it'd get. It's gonna get hit
> with at least Windows, Linux, Mac, Palm, WinCE and Symbian clients, and
> the browser wars are starting to heat up again.
>