Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are pages on the web which will never be updated because the author is dead. Browsers have to be able to render what is out there.

You could argue that we would have been better off new if all browsers from day one had only rendered valid html, but you need a time machine to fix that.



This problem can trivially be solved by introducing a new doctype. <!doctype newhtml> - strict parsing, otherwise sloppy parsing. I honestly don't understand why the web community doesn't adopt it.


Ummm, that already exists. That's how XHTML (delivered as XML) works. Make a syntax error in the page? Browser gives up, displays an error. It didn't catch on.

The various HTML strict modes turn off "quirks" mode as well.


It doesn't solve any problem, since the invalid html will still be in the wild and you still need to parse it. You just introduce a new parsing mode without graceful recovery.

Some authors might use the newhtml doctype (because they have read somewhere it is better) but only test in a browser which dont support newhtml mode, so they still don't discover that the html is invalid. So we are back to square one.




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

Search: