Chapter 17: Server-Side Techniques

Listing 17.2: Setting Environment Variables with BrowserMatchNoCase for Speed

BrowserMatchNoCase Mac isMAC
BrowserMatchNoCase Opera isOPERA
BrowserMatchNoCase Konquerer isKONQUERER

BrowserMatchNoCase "MSIE [4-9]" isIE
BrowserMatchNoCase "MSIE [5-9]" isIE5

BrowserMatchNoCase "MSIE.5\.[5-9]" isDOM
BrowserMatchNoCase "MSIE [6-9]" isDOM
BrowserMatchNoCase "Mozilla\/[4-9]" isNS
BrowserMatchNoCase Gecko isDOM

It is faster to set these environment variables within the httpd.conf file, and use them within your pages for server-side sniffing.