[Zope] Client Detection in Zope
Tino Wildenhain
tino@wildenhain.de
Mon, 06 Sep 1999 10:58:24 +0200
Michel Pelletier wrote:
>
> trafik@torped.se wrote:
> > with there Browscap.ini, a static fill defining
> > diffrent browsers and there propeties.
> > dynamicly test for javascript- and cookie-support
> > as well as special HTTP_* properties.
> >
> > I'm about to release a beta, if your intrested in
> > testning it for me?
> >
>
> Zope doesn't have this ability but it would be very nice, Roxen has a
> similar facility called the 'supports' database. It would be useful to
> say:
>
> <dtml-if "supports['javascript']">
> blah...
> </dtml-if>
erm.. and then? I've always doubted the usefullness of such a property.
If a browser does not support Javascript, it simply ignores it
(providing
it properly commented with sgml-comments in the source.
The same for applets and so on. A static Database cant represent the
actual browsers cababilities. If it uses HTTP_USER_AGENT to look up,
it must fail almost certain with some proxies hiding the user-agent
field completely or setting a default value there for all clients.
The same for unknown Useragents (the actual count of useragents is
legion)
Thus bringing up such funny messages as "Your browser does not support
frames... please get IE... " on say the new Psion5mx, where it displays
frames and its impossible to get the clumpy IE runninig on it...
So I would prefer to build the documents that way it can satisfy all
useragents from the same file or set of files itself.
And this _is_ possible.
A nice feature would be multilanguage-support via content-negotiation,
even different file representations from the preferences of the browser
(see content-negotiation in the apropriate RFCs)
But these are just my thougts, anyone can of course work on what he
wants :))
best regards,
Tino Wildenhain