W3C home > Mailing lists > Public > site-comments@w3.org > November 2009

IE6

From: Kenneth O'Brien <ken@kenobrien.org>
Date: Wed, 25 Nov 2009 22:50:34 +0000
Message-Id: <1259175888.3936.1.camel@laptop>
To: site-comments@w3.org
perhaps this before the doctype:

function detect_ie() {
            if (isset($_SERVER['HTTP_USER_AGENT']) &&
(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
                    return true;
                else
                    return false;
        }
        if(!detect_ie()){
            $mime= "application/xhtml+xml; ";
        }
        else {
            $mime= "text/html; ";
        }
        header('Content-type: ' . $mime);
        header('Vary: User-Agent');

        if($mime = "application/xhtml+xml; "){
            echo "<?xml version='1.0' encoding='utf-8' ?>";
        }

and this in the head:
<meta http-equiv="Content-Type" content="<?php echo
$mime; ?>charset=utf-8" />

Regards,

Ken
Received on Wednesday, 25 November 2009 23:18:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 24 October 2012 16:21:32 GMT