Hacker News new | past | comments | ask | show | jobs | submit login

Actually there are two different things—the parser and the rendering mode. The choice of the former depends solely on the MIME type—no matter that docypte you use if your page is served with text/html MIME it will be parsed by HTML parser. And keep in mind, that every slash in "/>" is treated as invalid attribute by this parser, so serving your XHTML page as text/html may be not the best idea. BTW, do "view source" of such page in Firefox 3 and you will see all slashes in red.

And if you did happen to server XHTML with proper MIME there could well be the case that your page would take longer to load on Gecko <1.9 — it did not support incremental rendering of XHTML so your document had to be fully loaded before it could be rendered.

HTML engine choses rendering mode (standards, almost standards, quirks) depending on DOCTYPE (for XHTML parser it is always standards mode). HTML engine must be always ready to recover from markup errors (and HTML5 does a good job describing what to do), XHTML parser can just die on the first error it encounters.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: