:> I am currently trying to figure out how I can use the powerful DTML :> 'macro'ing capability to build pages dependent on the browser and its :> services (plug-ins, Java, JavaScript). Is there a way to do this from :> the server side that would give me this information or am I :> relegated to :> the client side detection? Thanks in advance for your assistance. :> Please reply directly to me as the digest isn't always immediate. :> Thanks, :> : :Try: : :<!--#var HTTP_USER_AGENT--> : :this in conjuction with the #if tag, gives you browser conditional HTML: : :<!--#if "HTTP_USER_AGENT[7:] == 'Mozilla'"--> : <h1><blink>Isn't Netscape GREAT!!!</blink></h1> :<!--#/if--> : :-Michel
Well, I thought of that, but it doesn't get me the services offered. I was hoping for a method that could give be booleans for something like:
<!--#if client_javascript--> <h1><blink>Aren't You Glad Netscape's Rhino is Enabled!!!</blink></h1> <!--#/if-->
Martin Hudson Development InfoStructure 1101 N. Highland St., Ste. 200 Arlington, VA 22201 Phone: (703) 525-6485 Fax: (703) 525-6029 http://www.DevIS.com
FYI. I'm working on a product offering the same support the Microsofts ASP environment offers with there Browscap.ini, a static fill defining diffrent browsers and there propeties. Accualy I'm using the browscap.ini file as deinition fil in the product but I also intend to implement poll functions to 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?
Best Regards, Johan Carlsson johanc@torped.se
:> I am currently trying to figure out how I can use the powerful DTML :> 'macro'ing capability to build pages dependent on the browser and its :> services (plug-ins, Java, JavaScript). Is there a way to do this from :> the server side that would give me this information or am I :> relegated to :> the client side detection? Thanks in advance for your assistance. :> Please reply directly to me as the digest isn't always immediate. :> Thanks, :> : :Try: : :<!--#var HTTP_USER_AGENT--> : :this in conjuction with the #if tag, gives you browser conditional HTML: : :<!--#if "HTTP_USER_AGENT[7:] == 'Mozilla'"--> : <h1><blink>Isn't Netscape GREAT!!!</blink></h1> :<!--#/if--> : :-Michel
Well, I thought of that, but it doesn't get me the services offered. I was hoping for a method that could give be booleans for something like:
<!--#if client_javascript-->
<h1><blink>Aren't You Glad Netscape's Rhino is Enabled!!!</blink></h1> <!--#/if-->
Martin Hudson Development InfoStructure 1101 N. Highland St., Ste. 200 Arlington, VA 22201 Phone: (703) 525-6485 Fax: (703) 525-6029 http://www.DevIS.com
Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
trafik@torped.se wrote:
FYI. I'm working on a product offering the same support the Microsofts ASP environment offers with there Browscap.ini, a static fill defining diffrent browsers and there propeties. Accualy I'm using the browscap.ini file as deinition fil in the product but I also intend to implement poll functions to 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>
ZPublisher would populate 'supports' for every request from a cached flat database file. It wouldn't be too tricky.
-Michel
Best Regards, Johan Carlsson johanc@torped.se
:> I am currently trying to figure out how I can use the powerful DTML :> 'macro'ing capability to build pages dependent on the browser and its :> services (plug-ins, Java, JavaScript). Is there a way to do this from :> the server side that would give me this information or am I :> relegated to :> the client side detection? Thanks in advance for your assistance. :> Please reply directly to me as the digest isn't always immediate. :> Thanks, :> : :Try: : :<!--#var HTTP_USER_AGENT--> : :this in conjuction with the #if tag, gives you browser conditional HTML: : :<!--#if "HTTP_USER_AGENT[7:] == 'Mozilla'"--> : <h1><blink>Isn't Netscape GREAT!!!</blink></h1> :<!--#/if--> : :-Michel
Well, I thought of that, but it doesn't get me the services offered. I was hoping for a method that could give be booleans for something like:
<!--#if client_javascript-->
<h1><blink>Aren't You Glad Netscape's Rhino is Enabled!!!</blink></h1> <!--#/if-->
Martin Hudson Development InfoStructure 1101 N. Highland St., Ste. 200 Arlington, VA 22201 Phone: (703) 525-6485 Fax: (703) 525-6029 http://www.DevIS.com
Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
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
Tino Wildenhain wrote:
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.
I agree completely that this is a hack, and that all pages should be renderable by all browsers.
However, given that it *is* a hack it can be useful in situations that require a hack. Sniffing on HTTP_USER_AGENT is an almost identical hack, but often you are interested in one property or function of the browser in question, not actually what the browser is. You can either maintain your own database of browser features, or Zope can provide a standard one.
-Michel
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
Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )