Instead of sending one type of content to Internet Explorer 5 for Windows, another to Internet Explorer 5 for Macintosh, yet another to Internet Explorer 6, another to Netscape 6, and so on, you can simply serve two kinds of content: DOM and non-DOM.
If your browser does not support XHTML DOM you will automatically be redirected to a XHTML Transitional page. The code below is all that is needed. It detects if your browsers DOM recognizes "getElementByID".
<script type="text/javascript">
// <![CDATA[
if (!document.getElementByID) {
window.location = "dom_sniff_basicPage.html"
}
// ]]>
</script>