is it possible to do browser detection with zope? if so, how? daniel
From: "daniel edmond greenlaw" <314@valint.net>
is it possible to do browser detection with zope? if so, how?
Yup. Take a look at REQUEST.environ['HTTP_USER_AGENT'], which is also accessible as: REQUEST.HTTP_USER_AGENT REQUEST['HTTP_USER_AGENT'] and in DTML also as HTTP_USER_AGENT Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server ---------------------------------------------
Hi, daniel edmond greenlaw wrote:
is it possible to do browser detection with zope? if so, how?
It is definitively not a good idea to rely on browser detection for you pages. Especially if you dont already know how to do it. Try to make your HTML-code not so special to let it work for all browsers (you cant know how to handle the specific of all the browsers available). But, if you really cant live without it (please overthing it more than twice!) REQUEST['HTTP_USER_AGENT'] is your friend, together with various string-operations. Please note: you cant be sure if this field is set and tells you the truth about the partcular user-agent. best regards, Tino Wildenhain
participants (3)
-
daniel edmond greenlaw -
Martijn Pieters -
Tino Wildenhain