CINXE.COM
Tech Stuff - Server Side Browser Sniffing
<!DOCTYPE html> <html lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="icon" href="http://www.zytrax.com/favicon.ico"> <title>Tech Stuff - Server Side Browser Sniffing</title> <!-- this page originated from http://www.zytrax.com/tech/web/browser_sniffing.html --> <!-- HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 3.5.21022; .NET CLR 1.0.3705; .NET CLR 1.1.4322) --> <style type="text/css"> <!-- /* ZYTRAX STYLE SHEET */ /* google maps */ /* v\:* {behavior:url(#default#VML);} */ /* tag modifiers */ a {text-decoration:none;color:gray;} a:hover {text-decoration:underline;} a:hover.p-f-s {color:black} a:hover.a-n {text-decoration:none;} body {background-color:white;color:black;margin:0px;padding:0px;font:normal 1.0em Verdana,Arial, Helvetica, sans-serif;} code {border:1px solid lightgray;background:mintcream;color:black;font-family:"Courier New", monospace;padding:0 2px} div.l-f table{width:100%;padding:4px;} h1 {font-size:1.5em;;border-width:0 0 5px 0;border-style:solid;border-color:LightGray;padding:4px;color:black} h2 {border-width:0 0 5px 0;border-color:LightGray;border-style:solid;font-size:1.3em;font-weight:bold;padding:4px;color:black} h3 {border-width:0 0 3px 0;border-color:LightGray;border-style:solid;font-size:1.1em;padding:4px;color:black;} h4 {border-width:0 0 2px 0;border-color:LightGray;border-style:solid;font-size:1.0em;padding:2px;color:black;} h5 {border-width:0 0 2px 0;border-color:LightGray;border-style:solid;font-size:1.0em;font-weight:bold;color:black;padding:4px;} h6 {border-width:0 0 1px 0;border-color:LightGray;border-style:solid; font-size:80%;color:black;padding:4px;} pre {white-space:pre-wrap;} img {border:0;} img.center {display:block;margin-left:auto;margin-right:auto;} img.right {display:block;float:right;} img.left {display:block;float:left;} form {border:1px solid #ccc;} input {border:1px solid #999;background:#9bf;} textarea {border:1px solid #999;background:#9bf;} table {margin: 0 auto;} table.t-m-n > tbody > tr > td {border:1px solid #ccc;padding:4px;} table.t-m-s > tbody > tr > td {border:1px solid #ccc;padding:4px;} table.p-m-n > tbody > tr > td {padding:4px;border-collapse:collapse;} table.p-m-s > tbody > tr > td {padding:4px;border-collapse:collapse;} tr {vertical-align:top;} /* end tag modifiers - Printer friendly */ .adv {margin-right:auto;margin-left:auto;width:728px;} .l-b {position:absolute;top:0px;left:0px;font-size:80%;border:0;background:white;color:gray;height:100px;z-index:9;width:100%;} div.l-r #layout {visibility:visible;} div.l-l-fp #layout {visibility:visible;} .l-l {position:absolute;top:100px;left:6px;width:110px;font:10pt Verdana,Helvetica, Arial, sans-serif;z-index:1;} .l-c {margin:105px 170px 0px 125px;padding:4px 20px;border-width:0 1px; border-style:solid; border-color:LightGray; z-index:5; line-height:1.3em;} .l-r {position:absolute;top:100px;right:0;width:160px;background:white;z-index:2;font-size:80%;} /* end printer friendly - begin divs generic (cross browser) */ .i-2 {background: url(../../images/info.gif) no-repeat top left;border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} .i-3 {background: url(../../../images/info.gif) no-repeat top left;border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} .l-c-i {padding:10px;} .l-l-fp {position:absolute;top:95px;left:6px;width:120px;z-index:10;text-align:right;font-size:80%;} .l-r-fp {position:absolute;top:95px;right:6px;width:150px;z-index:2;font-size:80%;} .l-f-m {} .l-f {margin:0 200px 0 125px;} .l-p {margin:10px;padding:4px;font:10pt Verdana,Helvetica, Arial, sans-serif;} .l-100 {width:100%;margin:0;} .w-2 {background: url(../../images/warning.gif) no-repeat top left;border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} .w-3 {background: url(../../../images/warning.gif) no-repeat top left;border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} /* end divs - begin nav pop-outs */ .n-l-c {color:black;} .n-l1 {padding:0;margin:0;list-style:none;width:100px;} .n-l1p {padding:0;margin:0;list-style:none;text-align:right;color:#339;} .n-l1p-e {font-size:9pt;margin:0;text-align:right;line-height:1.2em;position:relative;color:#339;} .n-l1-e {text-align:right;margin:0;padding:2px;position:relative;} .n-t1-e,.n-t2-e,.n-t3-e,.n-m-l1 {text-align:left;margin:0;padding:2px 5px;border:1px solid black;border-width:1px 1px 0 1px;position:relative;} .n-t1-es,.n-t2-es,.n-t3-es {text-align:left;margin:0;padding:2px 5px;border:1px solid black;border-width:1px 1px 0 1px;position:relative;background:#eee;} .n-t1-v {position:absolute;display:none;padding:0;margin:0;list-style:none;top:100%;right:0;width:100px; border-bottom:1px solid black;background:white;} .n-t1-vr,.n-m-u1 {position:absolute;display:none;padding:0;margin:0;list-style:none; top:100%;right:0;width:100px;border-bottom:1px solid black;background:white;} .n-t2,.n-t3 {position:absolute;display:none;padding:0;margin:0;list-style:none;top:0;right:100%;width:120px;border-bottom:1px solid black;background:white;} /* end pop-up styles - begin nav effects */ .g-c-n:hover {background:#eee;} .g-c-s:hover {background:#eee;} /* W3c pop-ups - selectors ignored by MSIE 6- */ div.n-m:hover > ul {display:block;} div.n-t0:hover > ul {display:block;} li.n-t1-e:hover > ul {display:block;} li.n-t1-es:hover > ul {display:block;} li.n-t1-e:hover, li.n-t1-es:hover,li.n-t2-e:hover,li.n-t2-es:hover,li.n-t3-e:hover,li.n-m-l1:hover {background:#ccc;} li.n-t2-e:hover > ul {display:block;} li.n-t2-es:hover > ul {display:block;} .n-l1-e:hover > ul {display:block;} .n-l1p-e:hover > ul {display:block;} .n-l1-es:hover > ul {display:block;} .n-l2-e:hover > ul {display:block;} .n-l2-es:hover > ul {display:block;} .n-l3-e:hover > ul {display:block;} .n-l3-es:hover > ul {display:block;} li.n-l1-e:hover,li.n-l1p-e:hover,li.n-l2-e:hover,li.n-l2-es:hover, li.n-l3-e:hover, li.n-l3-es:hover,li.n-l4-e:hover {background:#ccc;} /* end pop-up effects - begin generic (cross browser) alpha */ .arrows {font-size:250%;} .a-n {text-decoration:none;} .at {font-family:Verdana,sans-serif;font-size:9pt;margin:0px;text-indent:8px;} .b-1 {font-family:Verdana, sans-serif;} .button {background:#ddd;border:3px outset black;} .b-lg {background-color:#eee;} .b-r {border-width:0 0 0 1px;border-color:#336;border-style:solid;width:150px;} .b-l {border-width:0 1px 0 0;border-color:#336;border-style:solid;width:110px;} .b-b-s {border:1px solid black;} /* color styles */ .c-r, .red {color:red;} .c-b, .blue {color:blue;} .c-lg {color:LightGray;} .c-g {color:gray;} /* end color styles */ .d {font-family:Verdana,sans-serif;font-size:9pt;margin:0px;} .dd {position:absolute;left:0;top:0; font-family:Tahoma,sans-serif;font-size:9pt; visibility:hidden;background:lime;color:black;margin:0px;border:black solid 1px;padding:2px;} .f-d {font-weight:bold;} .f-b-n {border:0;} /* most browsers use an unacceptably small monospace default font */ .g-c-n,.g-b-n {font:110% "Courier New",monospace;border-style:solid;border-color:#ccc;border-width: 1px 1px 1px 5px;background-color:#9bf;padding:5px; color:black;} .g-c-s,.g-b-s,.codegray {font: 80% "Courier New",monospace;border-style:solid;border-color:#ccc;border-width: 1px 1px 1px 5px; background-color:#9bf;padding:5px; color:black;width:inherit;} .g-h-n, .g-s-b {background:#9bf;color:#339;padding:4px;font-size:100%;font-weight:normal;border:1px solid #ccc;} .g-h-nn {background:#9bf;color:#339;padding:4px; font-size:100%;font-weight:normal;} .g-h-ng,.section {background:#339;color:white;font:bold Verdana,sans-serif;padding:4px; text-decoration:none;} .g-h-s {background:#9bf;color:#339;padding:4px; font-size:80%;font-weight:normal;border:1px solid #ccc;} .g-h-ss {background:#9bf;color:#339;padding:4px; font-size:80%;font-weight:normal;} .g-n {text-decoration:none;color:white;} .g-i1-n {margin:5px 5px 5px 20px;} .g-i2-n {margin:5px 5px 5px 30px;} .g-i3-n {margin:5px 5px 5px 40px;} .g-l-n {list-style:none;} .g-sb-n {color:blue;font-size:8pt;line-height:150%;margin:2px;} .g-s-n {background-color:#eee;color:black;font-size:10pt; text-decoration:none;} .h-b {background:#ddd;color:black;font-weight:bold;} .h-150 {line-height:1.5em;} .i-h {margin:5px 5px 10px 60px;padding:5px;} .i-n {border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} .i-s {border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:8pt;margin:10px 10px 10px 60px;padding:10px;} .i-u {width:27px;} .n-l {position:fixed;left:6px;width:110px;} .n-l-fp {left:6px;width:110px;} .n-l-f {font-size:1.0em;margin:2px;text-align:right;line-height:1.2em;color:black;} .n-l-f a {color:black;} .m-h5 {margin:0.5em 0;} .m-h20 {margin:2.0em 0;} .n-b-l {font:1pt Verdana, Arial, Helvetica, sans-serif;border-width:0 0 1px 0;border-style:solid;border-color:#CCF;margin:0px;padding:0px;} .n-l-s {font-size:80%;visibility:hidden;} .n-m {font-size:130%;margin:0;padding:0;float:right;position:relative;} .n-t0 {float:right;position:relative;} .n-t-t {text-align:right;padding:1px 1px 8px 1px;margin:0;} .o-n {list-style:none;} .p-b {background:#eee;text-indent:3em;} .p-m-n,.norm {font-size: 100%;border-spacing:0;border-collapse:collapse;} .p-m-s { font-size:80%;border:0;border-spacing:0;border-collapse:collapse;} .q-i-2 {background: url(../../images/quotes-open.gif) no-repeat top left;} .q-s {border-width: 0 0 0 6px;border-style:solid;border-color:#acf;font-size:8pt;margin:10px 10px 10px 60px;padding:10px;} .t-b-s {font:8pt "Courier New",monospace;border-style:solid;border-color:#ccc;border-width: 1px;background-color:#acf;padding:5px; color:black;} .t-b-n {font:10pt "Courier New",monospace;border-style:solid;border-color:black;border-width: 1px;background-color:#acf;padding:5px; color:black;} /* link/href styles */ .t-dd:hover {background:#ddd;} .w-db:hover {background:#ddd;} .t-ba {color:#aaa;font-weight:bold;} .t-gb {color:blue;background:#eee;} .t-dr {color:red;text-decoration:none;} .t-dw {color:#666;text-decoration:none;} .t-db,.t-dd {color:blue;text-decoration:none;} .t-da {color:black;} .w-db,.t-dn {text-decoration:none;} /* begin text styles */ .t-b {font-size:120%;} .t-b200 {font-size:200%;} .t-c, .center {text-align:center;} .t-g {background:#eee;} .t-h {} div.t-h:hover > div {display:block;} .t-h-1 {display:none;background:#eee;padding:5px;} .t-i {font-style:italic;} .t-l {text-align:left;} .t-n, .g-e-t, .g-e-d {font-size:100%;font-weight:normal;} .t-o {font-weight:bold;} .t-r {text-align:right;} .t-s {font-size:80%;} .t-ss {font-size:60%;} /* table styles */ .t-t-l {margin:0;} .t-td1-l,.t-td1 {border-style:solid;border-width:5px 0 0 0;border-color:#ddd;padding:3px 3px 8px 5px;} .t-td2-l,.t-td2 {border-style:solid;border-width:5px 0 0 0;border-color:#acf;padding:3px 3px 8px 5px;} .t-m {background:#ccc;color:blue;text-decoration:none;} .t-m-n {font-size: 100%;border: 2px solid #ccc;border-spacing:0;border-collapse:collapse;} .t-m-s {font-size:80%;border: 2px solid #ccc;border-spacing:0;border-collapse:collapse;} .vital {font-family:Tahoma,Arial, sans-serif;font-size:12pt;background-color:#ddd; color:black;border-color:red;} /* visibility */ .v-h {visibility:hidden;} /* width styles */ .w-450 {width:450px;} .w-350 {width:350px;} .w-300 {width:300px;} .w-250 {width:250px;} .w-200 {width:200px;} .w-180 {width:180px;} .w-150 {width:150px;} .w-120 {width:120px;} .w-100 {width:100px;} .w-80 {width:80px;} .w-88 {width:88px;} .w-50 {width:50px;} .w-32 {width:32px;} .w-27 {width:27px;} .w-20 {width:20px;} .w-10 {width:10px;} .w-11pc {width:11%;} .w-6pc {width:6%;} /* Gecko/W3C specific */ abbr[title]:after {content:"";} abbr[title]:hover:after {content:" (" attr(title)")";} /* W3C pop-ups */ .n-l2,.n-l3,.n-l4 {position:absolute;display:none;padding:0;margin:0;list-style:none;top:0;left:100%;width:120px;border-bottom:1px solid black;background:#EEE;font:8pt Verdana,Helvetica, Arial, sans-serif} .n-l2-e,.n-l3-e,.n-l4-e {text-align:left;margin:0;padding:2px 5px;border:1px solid black;border-width:1px 1px 0 1px;position:relative;} .n-l2-es,.n-l3-es,.n-l4-es {text-align:left;margin:0;padding:2px 5px;border:1px solid black;border-width:1px 1px 0 1px;position:relative;background:white;} /* end - start expand divs */ .v-f {display:none;} .v-o {display:block;} /* end expand divs */ #toplogo {float:left;vertical-align:bottom;} .g-ci-s {font:8pt "Courier New",monospace;border-style:solid;border-color:#ccc;border-width: 1px 1px 1px 5px; background-color:#acf;color:black;} .jp-h-n {position:absolute;left:50%;top:50%;text-indent:4px;font-family:Verdana,sans-serif;font-size:10pt; visibility:hidden;background:#EEEEEE;color:blue;text-decoration:none;} .n-l-u {font-family:Verdana,sans-serif;top:60px;left:6px;width:110px;background:white;} .n-l-l {font-size: 9pt;color:black;text-align:right;line-height:150%;} .n-p-f {color:#336;font:9pt/16pt Verdana,sans-serif;text-decoration:none;text-indent:6px;} .n-p-n {background:#EEE;color:#336;font:9pt Verdana,sans-serif;text-indent:6px;} .n-p-n a {text-indent:6px;display:block;} .n-p-o {font:10pt Verdana,sans-serif; background:#DDD;color:blue;text-decoration:none;height:16pt;} .n-t-n {color:#336;font:10pt Verdana,sans-serif;text-decoration:none;margin:0;padding:0;} .n-t-s {color:white;font: 8pt Verdana,sans-serif;text-decoration:none;padding:0 3px 0 0} .n-t-sr {color:#336;font: 8pt Verdana,sans-serif;text-decoration:none;padding:0 3px 0 0} .p-b-h {visibility:hidden;} .p-n-h {position:absolute;left:0;top:0;text-indent:4px;font-family:Verdana,sans-serif;font-size:small; visibility:hidden;background:#EEE;color:blue;text-decoration:none;border:1px blue solid;width:110px;} .p-f-s {font-family: Verdana, sans-serif; font-size:8pt; color:silver; background:white;text-decoration:none;} --> </style> <style type="text/css" media="print"> <!-- /* ZYTRAX STYLE SHEET PRINT TEMPLATE */ .l-l {display:none;} .l-r {display:none;} .l-c {width:600px;margin:0;padding:30px 10px 5px 10px; border-width:0;} .l-f {margin:5px;} .n-t-t {display:none;} .n-t0 {display:none;} .adv {display:none;} --> </style> <script type="text/javascript"> <!-- // copyright ZYTRAX, Inc. 1994 - 2014 // you may use this javascript code at your own risk. // we would like you to keep the copyright statement intact but don't insist on it. // If you make improvements mail us a copy or make it available on your own web site. // global variables var topall = new Array(2); var lownav = new Array(2); var lowpop = new Array(2); var rightnav = new Array(2); var rightpop = new Array(2); var x = 0; // global menu level var way = 'h'; var menu = null; var menus = null; var pop1 = new Array(2); var fs = 1.0; var days = new Array(7); var months = new Array(12); days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; months = ["January","February","March","April","May","June","July","August","September","October","November","December"]; function showtime() { var thistime = ""; var nowtime ="" var nowam = "AM"; var now = new Date(); var nowhour = now.getHours(); if (nowhour > 12) { nowam = "PM"; nowhour = nowhour - 12; } else if (nowhour == 0){ nowhour = 12; } var nowminutes = now.getMinutes(); if (nowminutes < 10 ){ nowminutes = "0" + nowminutes; } nowtime = nowhour + ":" + nowminutes + " " + nowam; thistime = days[now.getDay()] + " " + now.getDate() + " " + months[now.getMonth()] + " " + now.getFullYear() + ", " + nowtime; return thistime; } // -- W3C DOM specific code - first choice always function lock(num){ // lock relies on a style which end with -l rollover = document.getElementById("l" + num); if(rollover){ cn = rollover.className if((pos = cn.lastIndexOf("-")) != -1){ bcn = cn.substring(0,pos + 1); scn = cn.substring(pos +1); if(scn == "f" || scn == "o"){ rollover.className = bcn + "l"; } } } } function fontchange(fix) { x = document.getElementsByTagName("div"); for(i = 0; i < x.length; i++) { if(x[i].className == "l-c"){ if(x[i].style.fontSize == ""){ fs = 1.0; x[i].style.fontSize = "1.0em"; } if(fix == "d"){ if(fs <= 0.8){ break; }else{ fs = parseFloat(fs - 0.1); x[i].style.fontSize = fs + "em"; } }else{ if(fs >= 1.5){ break; }else{ fs = parseFloat(fs + 0.1); x[i].style.fontSize = fs + "em"; } } break; } } } function toggle(tid){ var dis; var disa; if(document.getElementById){ dis = document.getElementById(tid); disa = document.getElementById(tid + 'a'); }else{ dis = document.all.tid; disa = document.all.tid + 'a'; } if(dis.style.display == 'block'){ dis.style.display = 'none'; disa.style.display = 'block'; }else{ dis.style.display = 'block'; disa.style.display = 'none'; } } function gotourl($url) { window.location = $url; } function mailus(mbox,stub,subject) { mail = "mailto:"+mbox+"@"+stub; if(subject != ""){ mail = mail+"?SUBJECT="+"A-Z: "+subject; } window.location = mail; return; } // W3C compliant uses CSS popups not JS //--> </script> </head> <body> <!-- Page Header plus top nav bar --> <div class="l-b"> <!--if expr="!${isMob}" --> <a href="http://www.zytrax.com"><img id="toplogo" src="http://www.zytrax.com/images/zytrax-logo-info.png" alt="ZYTRAX Info Logo"></a> <!-- desktop browsers --> <p class="n-t-t"><a href="http://www.zytrax.com/feedback.htm" class="n-t-sr">mail us</a> | <a href="http://www.zytrax.com/run/mailpage.php" class="n-t-sr">mail this page</a></p> <div class="n-t0"> <a href="http://www.zytrax.com/Company/contacts.html" class="n-t-sr">contact us</a> </div> <div class="n-t0"> <a href="http://www.zytrax.com/training/" class="n-t-sr">training</a> | </div> <div class="n-t0"> <a href="http://www.zytrax.com/tech/" class="n-t-sr">tech stuff</a> | <ul class="n-t1-v"> <li class="n-t1-es"><a href="http://www.zytrax.com/tech/" class="t-da">tech stuff</a> <!-- tertiary pop-outs --> <ul class="n-t2"> <li class="n-t2-e"><a title="collection of technology stuff" href="http://www.zytrax.com/tech/" class="t-da">tech stuff</a></li> <li class="n-t2-es t-da">web stuff <ul class="n-t3"> <li class="n-t3-e"><a title="collection of web based technology stuff" href="http://www.zytrax.com/tech/web/" class="t-da">web stuff</a></li> <li class="n-t3-e"><a title="collection of UA strings for most browsers" href="http://www.zytrax.com/tech/web/browser_ids.htm" class="t-da">browser ids</a></li> <li class="n-t3-e"><a title="collection of mobile UA strings" href="http://www.zytrax.com/tech/web/mobile_ids.html" class="t-da">mobile ids</a></li> <li class="n-t3-e"><a title="our HTML5 page conversion process and thoughts" href="http://www.zytrax.com/tech/css/html5.html" class="t-da">HTML5 Convert</a></li> <li class="n-t3-e"><a title="how we do server-side browser sniffing with apache" href="http://www.zytrax.com/tech/web/browser_sniffing.html" class="t-da">browser sniffing</a></li> <li class="n-t3-e"><a title="apache environmental variables" href="http://www.zytrax.com/tech/web/env_var.htm" class="t-da">apache env's</a></li> <li class="n-t3-e"><a title="apache server side includes - extensive notes and examples" href="http://www.zytrax.com/tech/web/ssi.htm" class="t-da">apache ssi</a></li> <li class="n-t3-e"><a title="our css pop-up/pop-down/flyout menus for Gecko/Opera/MSIE" href="http://www.zytrax.com/tech/css/workarounds.html#popout" class="t-da">pop-outs (css)</a></li> <li class="n-t3-e"><a title="most of those annoying HTML entity codes that we forget all the time" href="http://www.zytrax.com/tech/web/entities.html" class="t-da">html entities</a></li> </ul> </li> <li class="n-t2-es t-da">open guides <ul class="n-t3"> <li class="n-t3-e"><a href="http://www.zytrax.com/books/" class="t-da">open guides</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/books/dns" class="t-da">dns guide</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/books/ldap" class="t-da">ldap guide</a></li> </ul> </li> <li class="n-t2-e"><a title="Decimal to Hexidecimal to Binary conversion - even Octal!" href="http://www.zytrax.com/tech/protocols/hex.html" class="t-da">Dec>Hex>Bin</a></li> <li class="n-t2-es t-da">survival stuff <ul class="n-t3"> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/" title="a series of survival guides for some popular open source software" class="t-da">survival stuff</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/ssl.html" class="t-da">ssl/tls & x.509</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/asn1.html" class="t-da">ASN.1</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/kerberos.html" class="t-da">kerberos</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/postfix.html" class="t-da">postfix</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/cron.html" class="t-da">cron</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/encryption.html" class="t-da">cryptography</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/wxwidgets.html" class="t-da">wxWidgets</a></li> </ul> </li> <li class="n-t2-es t-da">audio stuff <ul class="n-t3"> <li class="n-t3-e"><a title="Pages about Digital Audio, Primers, Calculator, Equalization, FFT" href="http://www.zytrax.com/tech/audio/" class="t-da">audio stuff</a></li> <li class="n-t3-e"><a title="Fundamentals, harmonics, overtone, partials, loudness, ADSR envelopes" href="http://www.zytrax.com/tech/audio/sound.html" class="t-da">sound primer</a></li> <li class="n-t3-e"><a title="Sound digitization, time domain, frequency domain" href="http://www.zytrax.com/tech/audio/digital-sound.html" class="t-da">digital sound</a></li> <li class="n-t3-e"><a title="common frequencies of instruments and in life" href="http://www.zytrax.com/tech/audio/audio.html" class="t-da">frequencies</a></li> <li class="n-t3-e"><a title="equalization principles, octaves, sound metering and FFT" href="http://www.zytrax.com/tech/audio/equalization.html" class="t-da">equalization</a></li> <li class="n-t3-e"><a title="Acoustic caculators for musical notes and FFT bin frequencies" href="http://www.zytrax.com/tech/audio/calculator.html" class="t-da">calculators</a></li> <li class="n-t3-e"><a title="Yet another audio glossary" href="http://www.zytrax.com/tech/audio/glossary.html" class="t-da">glossary</a></li> </ul> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/web/regex.htm" class="t-da">regex stuff</a></li> <li class="n-t2-es t-da">cable stuff <ul class="n-t3"> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/" class="t-da">cable stuff</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_lan.htm" class="t-da">lan wiring</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/mixed.html" class="t-da">lan & telephone</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_rs232.htm" class="t-da">rs232 stuff</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/heavy.htm" class="t-da">serial primer</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/pc/serial.html" class="t-da">usb 3.2 & firewire</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/pc/monitors.htm" class="t-da">displays</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/cables_jacks.htm" class="t-da">modular jacks</a></li> </ul> </li> <li class="n-t2-es t-da">protocol stuff <ul class="n-t3"> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/" class="t-da">protocol stuff</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/tcp.html" class="t-da">tcp-udp-icmp</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/ip-classes.html" class="t-da">ipv4</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/ip-classes.html#calculator" class="t-da">ipv4 Calculator</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/ipv6.html" class="t-da">ipv6</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/ipv6.html#calculator" class="t-da">ipv6 Calculator</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/isdn" class="t-da">isdn-bri</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/lan" class="t-da">802 lan</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/ss7" class="t-da">ss7 & sigtran</a></li> </ul> </li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/pc/" class="t-da">pc stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/wireless/" class="t-da">wireless stuff</a></li> <li class="n-t2-es t-da">css stuff <ul class="n-t3"> <li class="n-t3-e"><a title="collection of css notes and experiences including css menus and css liquid layout" href="http://www.zytrax.com/tech/css/" class="t-da">css stuff</a></li> <li class="n-t3-e"><a title="Notes on our experience with converting to css based liquid layouts - including blow by blow css" href="http://www.zytrax.com/tech/css/layoutnotes.html" class="t-da">css liquid design</a></li> <li class="n-t3-e"><a title="we have used css menus since mid-2003 - blow-by-blow implementation notes" href="http://www.zytrax.com/tech/css/workarounds.html#popout" class="t-da">css menus</a></li> <li class="n-t3-e"><a title="some practical solutions on using css" href="http://www.zytrax.com/tech/css/workarounds.html" class="t-da">css notes</a></li> <li class="n-t3-e"><a title="css shortforms at a glance" href="http://www.zytrax.com/tech/css/shortcut.html" class="t-da">css short-forms</a></li> <li class="n-t3-e"><a title="css selectors and quick overview with links to the W3C specs" href="http://www.zytrax.com/tech/css/syntax.html" class="t-da">css overview</a></li> </ul> </li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/codes.htm" class="t-da">ascii codes</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/data_rates.htm" class="t-da">data rate stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/telephony/" class="t-da">telephony stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/mech/" class="t-da">mech. stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/protocols/hex.html" class="t-da">Dec>Hex>Bin</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/lang/" class="t-da">language stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/electronics/" class="t-da">electronic stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/rfcs/" class="t-da">rfc stuff</a></li> </ul> </li> <li class="n-t1-e"><a href="http://www.zytrax.com/security/" class="t-da">Security</a></li> </ul> </div> <!-- close div l-b --> </div> <!-- begin body table --> <div class="l-c"> [an error occurred while processing this directive] <h1>Tech Stuff - Server Side Browser Sniffing</h1> <p>We decided a long time ago <a href="popout.htm" class="t-db">to generate browser specific web pages</a> to reduce page overheads, to simplify Javascript development and page layout. This page describes what we do and how we do it. We have written an opinion piece describing our <a href="web-pages.html" class="t-db">reasoning and approach to building this web site</a>.</p> <p>This is an extract from a <a href="popout_apache.htm" class="t-db">more detailed page on configuring Apache for SSI and browser sniffing</a>.</p> <p>In essence our technique uses server wide variables that can be interrogated by any hosted web site to generate unique - browser specific - page content or format. We now use a trivial variation of this technique to generate <i>Printer Friendly</i> pages using <a href="../css/workarounds.html" class="t-db">SSI generated CSS definitions</a>.</p> <h3>Configure Apache Browser Detection</h3> <p>Apache really is very powerful software with more features than you can shake a stick at. Apache can set some variables that you can then use to generate content using <a href="ssi.htm" class="t-db">SSI conditional directives</a>.</p> <p>To perform this magic you use the Apache directives 'BrowserMatchNoCase' or 'BrowserMatch' which apply a regular expression check to the Apache environmental variable HTTP_USER_AGENT which is supplied by every browser. For a survival guide to regular expresions read the grep man page under unix or <a href="regex.htm" class="t-db">our page on this exotic subject</a>. <a href="env_var.htm" class="t-db">Full list of Apache environmental variables</a>.</p> <p>By judicious checking you can find out the browser, its version, its platform even and anything else that may take your fancy. We have never seen a comprehensive list of Browser ID (or user-agent) strings <a href="browser_ids.htm" class="t-db">so we started one</a>.</p> <p>In our case we added browser detection checks to the <i>General Section</i> to provide a single consistent set of variables to all the web sites on our server (and hopefully reduce server load by doing it once and in one place). You could of course, by placing these lines inside a <vitualhost> section, limit them to that host only.</p> <p>We modified the 'General section' of httpd.conf as follows:</p> <pre id="browsers" class="g-b-n"> BrowserMatchNoCase Mozilla/[4-6] isJS BrowserMatchNoCase MSIE isIE BrowserMatchNoCase Gecko isW3C BrowserMatchNoCase MSIE.((5\.[5-9])|([6-9])) isW3C BrowserMatchNoCase (W3C_|validator) isW3C BrowserMatchNoCase (iphone|[mM]obile) isMob </pre> <p><a href="regex.htm" class="t-db">Complete explanation of these tests and an overview of regular expressions</a>.</p> <p>Now you can restart your Apache server 'cos you are ready for some action.</p> <h3>Server Side Browser Specific Page Generation</h3> <p>To generate code conditionally you can now use the above variables in SSI's, PHP, Ruby, PERL, Python or any other scripting language or service.</p> <p>The rest of this page illustrates this technique using Server Side Includes (SSI).</p> <p>You can you place SSI statements in any file with a .shtml, .htm or .html file (we use Apache's 'XHackBit On' directive for this purpose). SSI statements look like HTML comments and take the general format (<a href="http://httpd.apache.org/docs/mod/mod_include.html" class="t-db">full SSI list</a>)</p> <blockquote> <pre class="g-b-s"> <!--#element attribute=value attribute=value ... --> </pre> </blockquote> <p>There MUST NOT be a space between the '#element' and the second opening '-' and there MUST BE a space between the last character of the last 'attribute=value' pair and the first closing '-'.</p> <p>We make extensive use of only two elements, <i>include</i> and <i>conditional expressions</i> but have included <a href="ssi.htm" class="t-db">a complete SSI statement description</a>.</p> <h4>The 'include' element</h4> <p>The following shows a sample of one of our standard template .htm files, we just load it and 'save as' the target file name and then add the content:</p> <pre class="g-b-s"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html"> <meta name="GENERATOR" content="company name"> <!--#include virtual="/templates/meta.html" --> <title>Level 1 template</title> <!-- conditionally generated style sheet --> <!--#include virtual="/templates/styles.shtml" --> <!-- conditionally generated javascript code --> <!--#include virtual="/scripts/js.shtml" --> </head> <body> <!-- banner/page headings --> <!--#include virtual="/templates/level_1.shtml" --> <!-- begin body --> <div class="page-content"> <!-- unique page contents go here --> </div> <!--#config timefmt="%B %d %Y" --> <!--#set var=\"real_date\" value=\"$LAST_MODIFIED\" --> <!--#include virtual="/templates/footer.shtml" --> </body> </html> </pre> <p>We always include the css style sheet, the javascript code, the page header and the page footer from standard files. You can use the <LINK> tag for the style sheet and the 'src=file.js' in the <SCRIPT> section but we chose to minimise the number of web server accesses at the cost of exposing all our amazing code!!</p> <p>The #config and #set lines before the #include for the "footer.shtml" file is our way ensuring that the LAST_MODIFIED date is for this file not the footer file. We format the date (month day, year), save the current LAST_MODIFIED to the variable 'real_date' and then use "#echo var="real_date" in the footer file (<a href="ssi.htm" class="t-db">more info on SSI statements including this technique</a>).</p> <h4>Nesting SSI Expressions</h4> <p>The more observant among you may have noticed that some include files have an .shtml suffix and others not. If you want to use SSI expressions in an <i>#included</i> file then that file MUST have a .shtml suffix (even if you are using the XBitHack). We did not find this out until very late and had to modify <i>#include</i> lines in over 400 html files (well actually we found a fantasic 10 line PHP script to do it for us which <a href="../php" class="t-db">we then enhanced</a>).</p> <h3>SSI conditional expressions</h3> <p>The following code snippet shows how we generate browser conditional css style data from a <i>styles.shtml</i> file (remember we are nesting SSI directives so must use a .shtml file suffix):</p> <pre class="g-b-s"> <!-- Different browser values here --> <!--#if expr="${isW3C} && !${isIE}" --> /* W3C compliant browsers - currently just Gecko */ .n-l-s {font:bold 9pt Verdana,sans-serif; text-decoration:none} .popup {font:bold small Verdana,sans-serif; background:cyan; color:black;text-indent:4; text-decoration:none;} <!--#elif expr="${isIE}" --> /* Explorer and other DHTML browsers */ .n-l-s {font-family:Verdana,sans-serif; font-size:7pt;font-weight:bold;text-decoration:none} .popup {font-family:Verdana,sans-serif;font-size:small; font-weight:bold;background:cyan; color:black;text-indent:4; text-decoration:none;} <!--#else --> /* NS4.x CSS and display options here */ .n-l-s {font-family:Verdana,sans-serif; font-size:8pt;font-weight:bold; text-decoration:none} .popup {position:relative;font-family:Verdana,sans-serif; font-size:small;font-weight:bold; background:blue;color:white; text-decoration:none; text-indent:4;} #lnav0 {position:relative;top:0;left:0;} <!--#endif --> </pre> <p>The above code is trivial but can get a tad more complex if you add additional capability. We currently support the W3C'ish DOM (Gecko + Opera 7.54+), the MS DOM (IE 5.5+) and are rapidly removing our support for NS4.x. In the above simple example we test the variables 'isW3C' and 'isIE' (which Apache has kindly set for us above) and directly branch to the #else or #endif statements.</p> <p>Using variations of this technique can allow you do do almost any conditional page generation you wish. Does life get any better than that?</p> <hr> <p class="p-m-n"><br>Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or <a href="javascript:mailus('info-support','zytrax.com','Support Issue')" class="t-db">info-support at zytrax</a>. You will have a warm inner glow for the rest of the day.</p> <!-- end body div l-c --> </div> <div class="l-l"> <!-- left hand navigation --> <div class="n-l"> <p class="c-g t-b t-o m-h5 t-r">Tech Stuff</p> <!-- first row of navigation CSS format --> <ul class="n-l1p"> <li class="n-l1p-e"> <a href="http://www.zytrax.com/tech" class="n-l-c">tech home</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Digital Audio - primers, calculators, equalization, frequency tables, file formats, glossary - a mere splash in the ocean" href="http://www.zytrax.com/tech/audio/" class="n-l-c">audio stuff</a> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/sound.html" class="n-l-f">sound primer</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/digital-sound.html" class="n-l-f">digital primer</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/audio.html" class="n-l-f">note frequencies</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/equalization.html" class="n-l-f">eq, meters & fft</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/calculator.html" class="n-l-f">calculators</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/formats.html" class="n-l-f">files & codecs</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/glossary.html" class="n-l-f">glossary</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Browser IDs, SSIs, Apache Configuration, regular expressions" href="http://www.zytrax.com/tech/web/" class="n-l-c">web stuff</a> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/web/browser_ids.htm" class="n-l-f">browser ids</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/web/mobile_ids.html" class="n-l-f">mobile_ids</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/web/env_var.htm" class="n-l-f">apache env vars</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/web/ssi.htm" class="n-l-f">apache ssi</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/workarounds.html#popout" class="n-l-f">css popout menus</a></li> <li class="n-l2-e"><a title="most of those annoying HTML entity codes that we forget all the time" href="http://www.zytrax.com/tech/web/entities.html" class="n-l-f">html entities</a></li> <li class="n-l2-e"><a title="Decimal to Hexidecimal to Binary conversion - even Octal!" href="http://www.zytrax.com/tech/protocols/hex.html" class="n-l-f">dec > hex > bin</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a href="http://www.zytrax.com/tech/dom/" class="n-l-c">dom stuff</a><br> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/dom/guide.html" class="n-l-f">dom guide</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/dom/w3c_dom.html" class="n-l-f">page explorer</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/dom/navigate.html" class="n-l-f">dom navigation</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="CSS is about a lot more than STYLE. Wheezes, table-less layouts, CSS pop-ups, CSS Shortcuts" href="http://www.zytrax.com/tech/css/" class="n-l-c">css stuff</a> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/layoutnotes.html" class="n-l-f">css liquid design</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/workarounds.html#popout" class="n-l-f">css popout menus</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/workarounds.html" class="n-l-f">css notes</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/syntax.html" class="n-l-f">css syntax</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/shortcut.html" class="n-l-f">css short-forms</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="includes PHP, Ruby and some Java stuff (all about obscure solutions to stupid problems)" href="http://www.zytrax.com/tech/lang/" class="n-l-c">language stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="quick overview 'cos we always forget - not that we ever knew much - now includes a nifty browser-based tester" href="http://www.zytrax.com/tech/web/regex.htm" class="n-l-c">regex stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="rfc ordered by subject" href="http://www.zytrax.com/tech/rfcs/" class="n-l-c">rfc stuff</a> <ul class="n-l2"> <li title="dns rfcs" class="n-l2-e"><a href="http://www.zytrax.com/books/dns/apd/" class="n-l-f">dns rfcs</a></li> <li title="ldap rfcs" class="n-l2-e"><a href="http://www.zytrax.com/books/ldap/apc/" class="n-l-f">ldap rfcs</a></li> <li title="ipv6 rfcs" class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/ipv6.html#rfcs" class="n-l-f">ipv6 rfcs</a></li> <li title="tls/x.509 rfcs" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/ssl.html#rfcs" class="n-l-f">tls/x.509 rfcs</a></li> <li title="some other subjects - we only update these when we are active - some lists are consequently long in the tooth" class="n-l2-e"><a href="http://www.zytrax.com/tech/rfcs" class="n-l-f">other rfcs</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="TCP/IP, IPv4, IPv6, ISDN, LAN, VoIP, ITU Multi-Media" href="http://www.zytrax.com/tech/protocols/" class="n-l-c">protocol stuff</a> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/tcp.html" class="n-l-f">tcp, udp, icmp</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/ip-classes.html" class="n-l-f">ipv4</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/ipv6.html" class="n-l-f">ipv6</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/isdn/" class="n-l-f">isdn</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/ssl.html" class="n-l-f">ssl/tls/x.509</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/ss7/" class="n-l-f">ss7 &sigtran</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/lan/" class="n-l-f">802.3 lan</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="PC Parallel Ports, LAN wiring, RS232, Centronics, DIN" href="http://www.zytrax.com/tech/layer_1/" class="n-l-c">cable stuff</a> <ul class="n-l2"> <li title="10baseT, 100base-TX/T4, 1000baseT, 10Gbase-T, RJ45, STP" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_lan.htm" class="n-l-f">lan pinouts</a></li> <li title="mixing telephony and 802.3 LAN can be done on cat5/5e/6 wiring" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/mixed.html" class="n-l-f">lan & telephone</a></li> <li title="RS 232 pinouts on db9, db24 and T1" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_rs232.htm" class="n-l-f">rs232 pinouts</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/heavy.htm" class="n-l-f">serial primer</a></li> <li title="USB 2.0, 3.0, 3.1 and 3.2 plus Firewire (i.Link) IEE 1394" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/serial.html" class="n-l-f">usb & firewire</a></li> <li title="some information about display and monitors/console interfaces inclusing VGA, HDMI, DVI and Thunderbolt" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/monitors.htm" class="n-l-f">displays</a></li> <li title="modular jack is the term we should use for those telephone and lan connectors" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/cables_jacks.htm" class="n-l-f">modular jacks</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="10baseT, 100base-TX/T4, 1000baseT, 10Gbase-T, RJ45, STP" href="http://www.zytrax.com/tech/layer_1/cables/tech_lan.htm" class="n-l-c">lan wiring</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="DB9, DB25 pinouts, RJ45 serial, T1 and RS standards alphabet soup" href="http://www.zytrax.com/tech/layer_1/cables/tech_rs232.htm" class="n-l-c">rs232 wiring</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Decimal to Hex and Binary conversion table - even a description of Octal!" href="http://www.zytrax.com/tech/protocols/hex.html" class="n-l-c">dec > hex > bin</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="character sets ain't as simple as they look" href="http://www.zytrax.com/tech/codes.htm" class="n-l-c">character sets</a> <ul class="n-l2"> <li title="pretty much all the characters sets in the known universe including utf-7, 8 and 16" class="n-l2-e"><a href="http://www.zytrax.com/tech/characters/" class="n-l-f">character sets</a></li> <li title="ascii variant of international reference alphabet 5 (ira5)" class="n-l2-e"><a href="http://www.zytrax.com/tech/codes.htm" class="n-l-f">ascii codes</a></li> <li title="international reference alphabet 5 (ascii's cousin)" class="n-l2-e"><a href="http://www.zytrax.com/tech/ia5.html" class="n-l-f">ia5 codes</a></li> <li title="all that ™ & © stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/web/entities.html" class="n-l-f">html entities</a></li> <li title="silly page containing a bunch of fonts in various sizes including your PCs defaults" class="n-l2-e"><a href="http://www.zytrax.com/tech/web/fonts.html" class="n-l-f">web fonts</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="The T series, E series and J series and then all that optical stuff (OC-12 etc.)" href="http://www.zytrax.com/tech/data_rates.htm" class="n-l-c">data rate stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Even us electronic guys gotta know how to screw it together, if you get our drift" href="http://www.zytrax.com/tech/mech/" class="n-l-c">mechanical stuff</a> <ul class="n-l2"> <li title="fastener (screw) head styles - surprising number of choices" class="n-l2-e"><a href="http://www.zytrax.com/tech/mech/heads.htm" class="n-l-f">head styles</a></li> <li title="threads for imperial (UNF, UNC) & metric sizes" class="n-l2-e"><a href="http://www.zytrax.com/tech/mech/threads.htm" class="n-l-f">threads</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="A collection of howtos including Samba3 as PDC, FreeBSD firewalls" href="http://www.zytrax.com/tech/howtos/" class="n-l-c">howto stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="A collection of survival guides - quick overviews - to popular software" href="http://www.zytrax.com/tech/survival/" class="n-l-c">survival stuff</a> <ul class="n-l2"> <li title="tls and x.509 (ssl) certificates - warning: headache inducing stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/ssl.html" class="n-l-f">ssl/tls/x.509</a></li> <li title="Abstract Syntax Notation. 1 (ASN.!) and Distinguished Encoding Rules (DER) - not for the faint hearted. Pass the pain medication, we feel a headache coming on." class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/asn1.html" class="n-l-f">ASN.1 & DER</a></li> <li title="Kerberos is great - but tough, oh my, tough stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/kerberos.html" class="n-l-f">kerberos</a></li> <li title="We've used postfix for years but always forget which of the 27 million parameters to use" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/postfix.html" class="n-l-f">postfix</a></li> <li title="Symetric, asymetric, MACs, hashes - eye watering stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/encryption.html" class="n-l-f">encryption</a></li> <li title="Just what time is it in Kuala Lumpur, and what's that got to do with cron?" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/cron.html" class="t-db">cron</a></li> <li title="Gotta love wxWidgets - free, fantastic, flexible - but hard to see the wood for the trees sometimes" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/wxwidgets.html" class="n-l-f">wxWidgets</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Our wireless overview, Calculators, Fresnel zones, links to 'heavy' stuff, some early 802.11 stuff (mostly wi-fi related)" href="http://www.zytrax.com/tech/wireless/" class="n-l-c">wireless stuff</a> <ul class="n-l2"> <li title="our irreverent general intro to wirelss - purist will not like this page" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/intro.htm" class="n-l-f">overview</a></li> <li title="wireless calculators for system budgets, free-space loss, fresnel effects and a bunch of other stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/calc.htm" class="n-l-f">calculators</a></li> <li title="fresnel effect explanation - well, we can understand it" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/fresnel.htm" class="n-l-f">fresnel effects</a></li> <li title="our outrageously biased description of frequency hopping versus direct sequence for spread spectrum" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/fh_ds.htm" class="n-l-f">fh vs ds</a></li> <li title="some terminology covering 802 standards and modulation techniques" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/soup.html" class="n-l-f">wireless soup</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Pinouts - USB, DIN, Firewire, VGA, DVI, HDMI, DisplayPort and Thunderbolt, I/O interface speeds, Screen sizes including HD" href="http://www.zytrax.com/tech/pc/" class="n-l-c">pc stuff</a> <ul class="n-l2"> <li title="din and mini-din for older PCs" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/din.htm" class="n-l-f">din & mini-din</a></li> <li title="802.3 LAN stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_lan.htm" class="n-l-f">802.3 lan</a></li> <li title="connection of monitors has changed over the years from clunky VGA to svelte HDMI - all the pinouts you could hope for" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/monitors.htm" class="n-l-f">monitor pinouts</a></li> <li title="serial (db9, db24) connections - slow but trusty" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_rs232.htm" class="n-l-f">serial stuff</a></li> <li title="usb pinouts and descriptions of power levels for usb 1, 2 and 3 - also includes firewire" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/serial.html" class="n-l-f">usb & firewire</a></li> <li title="pc interfaces are changing and getting faster - we can never keep up - list of interfaces and their speeds" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/interfaces.html" class="n-l-f">pc interfaces</a></li> <li title="we get confused about most things - just what is 1080p - pc and tv screen resolution table with some explanations" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/resolution.html" class="n-l-f">screen resolutions</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Electronic glossary, some old experiments with 3.3/5V protection and early BGA designs" href="http://www.zytrax.com/tech/electronics/" class="n-l-c">electronic stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="ragbag collection of links that we publish from time to time - maybe useful, maybe not" href="http://www.zytrax.com/links" class="n-l-c">tech links</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Our DNS and LDAP for Rocket Scientists guides" href="http://www.zytrax.com/books" class="n-l-c">open guides</a> <ul class="n-l2"> <li title="dns for rocket scientists" class="n-l2-e"><a href="http://www.zytrax.com/books/dns/" class="n-l-f">dns guide</a></li> <li title="ldap for rocket scientists" class="n-l2-e"><a href="http://www.zytrax.com/books/ldap/" class="n-l-f">ldap guide</a></li> </ul> </li> </ul> <p class="t-r"> <a title="RSS (2.0) Feed - right click on icon, select 'Copy Link URL' or 'Copy Shortcut', paste into RSS Feed Reader, or drag and drop into RSS Feed Reader" href="http://www.zytrax.com/zytrax.rss" class="n-l-c"><img class="w-32 center" src="http://www.zytrax.com/images/rss.png" alt="RSS Feed Icon"></a> </p> <p class="p-b-h t-r">If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C standards compliant browser such as <a href="http://www.mozilla.org" class="t-db">Firefox</a></p> </div> </div> <div class="l-r"> <!-- right menu --> <div class="w-150"> <!-- SiteSearch Google --> <p class="c-g t-b t-o m-h8">Search</p> <form class="f-b-n" method="get" action="http://www.google.com/custom" target="_top"> <table> <tr> <td style="white-space: nowrap"> <input type="hidden" name="domains" value="www.zytrax.com"> <input class="b-lg" type="text" name="q" size="16" maxlength="255" value=""> </td></tr> <tr> <td style="white-space: nowrap"> <table> <tr> <td> <input type="radio" name="sitesearch" value="" checked="checked"><span class="t-s">web</span> </td> <td> <input type="radio" name="sitesearch" value="www.zytrax.com" ><span class="t-s">zytrax.com</span> </td> </tr> </table> <input class="b-lg" type="submit" name="sa" value="Google Search"> <input type="hidden" name="client" value="pub-9419480011552853"> <input type="hidden" name="forid" value="1"> <input type="hidden" name="ie" value="ISO-8859-1"> <input type="hidden" name="oe" value="ISO-8859-1"> <input type="hidden" name="safe" value="active"> <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:355;L:http://www.zytrax.com/images/zytrax-info-google.gif;S:http://www.zytrax.com/tech;FORID:1;"> <input type="hidden" name="hl" value="en"> </td></tr></table> </form> <!-- SiteSearch Google --> <!-- share page feature --> <div class="t-h"><p><span class="t-g">Share</span></p> <div class="t-h-1"> Icons made by <a href="https://www.flaticon.com/authors/icomoon" title="Icomoon">Icomoon</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div></div> <a href="http://www.facebook.com/share.php?u=http://www.zytrax.com/tech/web/browser_sniffing.html&h=Tech%20Stuff%20-%20Server%20Side%20Browser%20Sniffing"><img class="w-32" title="add page to facebook" src="http://www.zytrax.com/images/facebook.png" alt="share page via facebook"></a> <a href="http://twitter.com/home/?status=Useful%20page%20http://www.zytrax.com/tech/web/browser_sniffing.html"><img class="w-32" title="tweet this page" src="http://www.zytrax.com/images/twitter.png" alt="tweet this page"></a> <p class="c-g t-b t-o m-h5">Page<p> <a class="a-n" href="http://www.zytrax.com/feedback.htm"><img class="w-32" title="Page comment feature" src="http://www.zytrax.com/images/mail.png" alt="email us"></a> <a class="a-n" href="http://www.zytrax.com/run/mailpage.php"><img class="w-32" title="Send to a friend" src="http://www.zytrax.com/images/mailfriend.png" alt="Send to a friend feature"></a> <a class="a-n" href="#" onclick="window.print();return false;"><img class="w-32" title="print page" src="http://www.zytrax.com/images/printpage.png" alt="print this page"></a> <a class="a-n" title="View page full width - suppresses left and right hand menus" href="http://www.zytrax.com/tech/web/browser_sniffing.html?pf=yes"><img class="w-32" src="http://www.zytrax.com/images/fullwidth.png" alt="Display full width page"></a> <a class="a-n" href="#" onclick="fontchange('d');return false;"><img class="w-32" title="Decrease font size" src="http://www.zytrax.com/images/smaller.png" alt="Decrease font size"></a> <a class="a-n" href="#" onclick="fontchange('i');return false;"><img class="w-32" title="Increase font size" src="http://www.zytrax.com/images/bigger.png" alt="Increase font size"></a> <p class="c-g t-b t-o m-h5">Resources</p> <p class="c-g t-b t-o m-h5">HTML Stuff</p> <p> <a title="It was the Last HTML standard - the future was XHTML - but HTML 5 rises from the ashes" href="http://www.w3.org/TR/html4/" target="_blank" class="w-db">W3C HTML 4.01</a><br> <a title="HTML is alive and well and moving toward HTML5 - the objective being an incremental standard - reconciling HTML4 and XHTML - in your dreams?" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/" target="_blank" class="w-db">HTML5 (WHATWG)</a><br> <a title="HTML4 - HTML5 differences - well today's differences - and tomorrow's. Who knows." href="http://dev.w3.org/html5/html4-differences/" target="_blank" class="w-db">HTML4 vs HTML5</a><br> <a title="W3C current HTML5 Reference" href="http://dev.w3.org/html5/html-author/" target="_blank" class="w-db">HTML5 Reference</a><br> <a title="Excellent tool and great for finding page bugs as well" href="http://validator.w3.org/" target="_blank" class="w-db">W3C Page Validator</a><br> <a title="Quick list of valid DTD's - explains one of life's great mysteries" href="http://www.w3.org/QA/2002/04/valid-dtd-list.html" target="_blank" class="w-db">W3C DOCTYPE</a> </p> <p class="c-g t-b t-o m-h5">CSS Stuff</p> <p> <a title="CSS2.1 - the only approved spec" href="http://www.w3.org/TR/CSS2/" target="_blank" class="w-db">W3C CSS2.1</a><br> <a title="CSS2.2 - the lastest non-approved draft" href="https://drafts.csswg.org/css2/" target="_blank" class="w-db">W3C CSS2.2</a><br> <a title="CSS2.2 - informative (not a standard) default style sheet" href="http://www.w3.org/TR/REC-CSS2/sample.html" target="_blank" class="w-db">Default Styles</a><br> <a title="CSS3 - Selectors" href="http://www.w3.org/TR/css3-selectors/" target="_blank" class="w-db">CSS3 Selectors</a><br> <a title="CSS3 - standardized media queries" href="http://www.w3.org/TR/css3-mediaqueries/" target="_blank" class="w-db">CSS 3 Media Queries</a><br> <a title="CSS3 - color names and values" href="http://www.w3.org/TR/2003/CR-css3-color-20030514/#html4" target="_blank" class="w-db">CSS 3 Colors</a> </p> <p class="c-g t-b t-o m-h5">DOM Stuff</p> <p> <a title="W3C's main DOM site with links to all their DOM documentation" href="http://www.w3c.org/DOM/" target="_blank" class="w-db">W3C DOM</a><br> <a title="W3C DOM 3 Core recommendation" href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/" target="_blank" class="w-db">W3C DOM 3 Core</a><br> <a title="Dom 3 Events" href="http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/" target="_blank" class="w-db">W3C 3 Events</a> </p> <p class="c-g t-b t-o m-h5">Accessibility</p> <p> <a title="Excellent resource - research based as opposed to opnions. The guide is superb" href="http://www.usability.gov/" target="_blank" class="w-db">usability.gov</a><br> <a title="Bit heavy on motherhood." href="http://www.w3.org/WAI/guid-tech.html" target="_blank" class="w-db">W3C - WAI</a><br> <a title="Used to be the yale style guide - now renamed - good stuff" href="http://www.webstyleguide.com/index.html?/contents.html" target="_blank" class="w-db">Web Style Guide</a><br> <a title="Good background explanations such as how screen readers work and some useful tools - perhaps a bit light on research references" href="http://www.webaim.org/" target="_blank" class="w-db">WebAim.org</a><br> </p> <p class="c-g t-b t-o m-h5">Useful Stuff</p> <p> <a title="Good solid stuff well presented and paced" href="http://www.quirksmode.org/" target="_blank" class="w-db">Peter-Paul Koch</a><br> <a title="Outspoken site on use of Web Standards - many excellent articles" href="http://www.alistapart.com/" target="_blank" class="w-db">A List Apart</a><br> <a title="Some really great uses of CSS - is this CSS's future?" href="http://www.meyerweb.com/eric/css/" target="_blank" class="w-db">Eric Meyer on CSS</a><br> <a title="Real world layouts - highly pratical site for us hard working folks" href="http://glish.com/css/" target="_blank" class="w-db">glish.com</a> </p> <p class="c-g t-b t-o m-h5">Our Stuff</p> <p> <a href="http://www.zytrax.com/tech/dom/" >Our DOM Pages</a><br> <a title="Overview of navigating the DOM using Javascript" href="http://www.zytrax.com/tech/dom/navigate.html" >DOM Navigation</a><br> <a title="CSS Techniques and workarounds, including 3 column layout, pop-ups and more" href="http://www.zytrax.com/tech/css/layoutnotes.html" >Liquid Layout</a><br> <a title="CSS short forms to avoid all that 'border-with-right' stuff" href="http://www.zytrax.com/tech/css/shortcut.html" >CSS Short Cuts</a><br> <a title="CSS overview with selectors and W3C spec links" href="http://www.zytrax.com/tech/css/syntax.html" >CSS overview</a><br> <a title="CSS one page overview with links to all the W3C docs" href="http://www.zytrax.com/tech/css/syntax.html" >CSS One Page</a> </p> <p class="c-g t-b t-o m-h5">Javascript Stuff</p> <p> <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm" target="_blank" class="w-db">ECMA-262</a> </p> </div> <p class="c-g t-b t-o">Site</p> <a class="a-n" href="http://www.zytrax.com/about_site.htm#css"><img class="w-32" src="http://www.zytrax.com/images/css.png" alt="CSS Technology"></a> <a class="a-n" href="http://www.zytrax.com/security/spf.html"><img title="SPF Record Conformant Domain" class="w-32" src="http://www.zytrax.com/images/spf.png" alt="SPF Record Conformant Domain"></a> </div> <div class="l-f"> <!-- standard footer full width --> <table> <tr> <td class="p-f-s t-l"> Copyright © 1994 - 2024 ZyTrax, Inc.<br> All rights reserved. <a href="http://www.zytrax.com/legal.html" class="p-f-s">Legal</a> and <a href="http://www.zytrax.com/privacy.html" class="p-f-s">Privacy</a> </td> <td class="t-c"><a href="https://www.zytrax.com" target="_blank" class="p-f-s">site by zytrax</a><br> <a href="https://www.javapipe.com" target="_blank" class="p-f-s">hosted by javapipe.com</a></td> <td class="p-f-s t-r"> <a href="javascript:mailus('web-master','zytrax.com','About Web site')" class="p-f-s">web-master at zytrax</a><br> Page modified: January 20 2022. </td> </tr> </table> </div> <!-- pop-out tables only if Javascript supported --> <!-- only css menus --> </body> </html>