Forum OpenACS Q&A: Re: TCL function for capturing browser type

Collapse
Posted by Pavel Boghita on
this is how I've done it in the end (hopefully it will help somebody)

#get user-agent

set headers [ns_conn headers]
set uagent [ns_set iget $headers User-Agent]
if { [regexp "Mozilla/4.0" $uagent] } {
set browser "no_tranparency"
}else {
set browser "transparency"
}

I have also found this which may help
http://www.aolserver.com/docs/devel/tcl/example1.adp.txt