3215 Posts in 848 Topics by 811 members
|Go to End|
5 February 2011 at 12:12am
In IE the XHTML DocType I have is replaced by the standard HTML 4 Doctype, causing the site to look radically different.
I've tried setting ContentNegiotator off in both the page's php file and _config and have the <?xml before the DOCTYPE but it is still being replaced.
How can I set it so that the DOCTYPE is left as it is in the .ss file?
12 February 2011 at 5:08am Last edited: 12 February 2011 5:26am
Re: How can I set it so that the DOCTYPE is left as it is in the .ss file?
IE expects that the *first* line is the Doctype. You have probably the "<?xml version="1.0" encoding="UTF-8"?>" tag there.
This tag is unnecessary if you make sure the server delivers utf-8 per default.
You can do that via php:
header("Content-Type: text/html; charset=utf-8");
... or html:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
Edit: Silverstripe already sends a proper utf-8 content-type per default. So just delete the "<?xml version="1.0" encoding="UTF-8"?>" tag or whatever you have there in the first line and IE will stop replacing the doctype.
|Go to Top|