Re:The HTML5 Parsing Algorithm
by tedunangst on Thursday August 05, 2010 @09:53PM
(#1579961)
Use a new parser for new pages, the old parser for old pages. The introduction of H.264 didn't suddenly render all older formats unplayable. Why can't a new markup format coexist with older formats, too?
[ Parent
| on HN ]
What would be the advantage of that? Also, you then never truly can ditch the old parser if you want to keep everything working. Your browser has to come with two parsers for all eternity.
How many codecs does your media player come with?
Not enough because there always seems to be this one file it absolutely cannot play ;)
It’s possible to do it but it’s also needlessly complex while giving you very little in return. The biggest, most problematic flaw of allowing browsers to parse invalid code, namely that different browsers might handle failure differently, is in the process of being fixed and that’s good enough, I think.
Strict parsing has been tried and it was a resounding failure. It’s not going to happen.
Web browsers already have this, and it sucks. There's XML mode, HTML standards mode, HTML quirks mode and HTML almost standards mode. It's horrible to test and maintain.
1. How do you discriminate?
2. What would the point be, apart from annoying every single end user?
Re:The HTML5 Parsing Algorithm
by jimmyjazz14 on Friday August 06, 2010 @01:46AM
(#1580319)
Maybe a content-type header from the server? The point as I may wrongly see it is, that attempting to support backward compatibility indefinitely will result in overly complex and bloated browsers in the future.
Nobody sets headers and meta information correctly anyway. Those headers cannot be trusted, and browsers have to guess what content-type and character encoding should actually apply to any particular document.