[Zope] Get browser information from HTTP_USER_AGENT..

Pattreeya Tanisaro pattreeya@lightwerk.com
Fri, 23 Feb 2001 19:27:41 +0100


Hello!
 	I would like to get the information about user's browser but when I
add these following tags in my dtml header, the result from the third 
condition is always true.  (I checked with netscape and konqueror and the 
results were the same, Your browser is neither IE nor Netscape. ) 

	Thank you so much in advance for any suggestion.

<dtml-if "_.string.find(_['HTTP_USER_AGENT'], 'MSIE')  <> -1">
    <link href="<dtml-var "msie_css.absolute_url()">" rel="stylesheet" 
type="text/css">
	Your browser is IE.
    <dtml-elif "_.string.find(_['HTTP_USER_AGENT'], 'NETSCAPE') <> -1">
    <link href="<dtml-var "netscape_css.absolute_url()">" rel="stylesheet" 
type="text/css">
	Your browser is Netscape.
    <dtml-else>
    <link href="<dtml-var "lw_global_css.absolute_url()">" rel="stylesheet" 
type="text/css">
	Your browser is neither IE nor netscape.
    </dtml-if>