We’ve built a javascript based widget that our client has embedded in their website. They claim it doesn’t work on their site in IE7, and that the problem is the difference in doctype headers at the top of their pages:
Ours:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Theirs:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Is there any difference in these two headers, and how they would effect performance in IE7?
Thanks-
The second doctype will trigger Quirks mode in IE. In this mode it emulates a number of bugs from IE 5.x so that it can be compatible with 199x era websites.
This has a wide range of effects and includes such things as getting the meaning of
widthin CSS wrong (fixed from IE6 onwards but only in standards mode) and gettingsetAttributewrong (fixed from IE8 onwards, but only in standards mode).