My web application is triggering quirks mode in IE8. It changes my doctype (html5) and then capitalizes every tag.
When I save the page in Google Chrome and open the saved page in IE8 it works fine.
Does anyone know what is going wrong here and how I can fix it?
What I already tried:
I read this and tried playing with comments before <html>
, without
luck:
IE6 changes DOCTYPE to a bad one
I saw Google Chrome's saved version had a META tag defining the
content-type added. Tried inserting this in the page, and tried doing
this with php's header()
, but without luck.
I tried other doctypes I found on this page: http://dorward.me.uk/www/ie8/
Using the saved version is not an option because the page is generated with PHP.
Edit: I tried putting the Google Chrome version on the web server, but IE fails on that version too. Are there any server settings which can affect IE's rendering of the page?
Edit2: I tried
<!DOCTYPE html>
and
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
They were both changed to:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">`
Found it. Internet Explorer's compatibility mode was on for websites on the internal network.
I could slap myself.