Please can I clarify some thinking here:
Quirksmode is invoked if no doctype is specified.
but
When served from localhost IE appears to go into quirksmode regardless of doctype. Please can this be confirmed and can someone explain why this is the case.
however
When served from localhost and IE goes into quirksmode regardless of doctype this can be overridden by including a meta tag in the first line of the head
<meta http-equiv="X-UA-Compatible" content="IE=edge">
This doesn't work for me ... have I got the syntax wrong?
The meta in the head will only ever be applied when served from localhost? Is this true if so why.
At the moment everything looks fine in FF Chrome Opera etc whether served from localhost or across the net.
But I just get quirks mode in IE
My doctype is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Finally is there a relationship between charset and quirksmode?
I have been using
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
On apache with apache config set to default to UTF-8
I wanted to summarise the findings from this question.
To switch off compatibility mode in IE9
Main points for changing code
So actions completed to resolve problem.
Use <!Doctype html>
ensuring that the html document commences with this. N:B this does not mean that this has to be the first line of the HTML. php includes can precede it.
In the <head>
Use <meta charset="UTF-8">
<?php header("content-Type: text/html; charset=utf-8"); ?>