This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Consider the following document: <html> <head></head> <body> </body> </html> The tree builder algorithm will insert a text node containing whitespace between the head element and the body element. As far as I can tell, IE, Firefox, Chrome, Safari, and Opera do not insert this text node: http://webblaze.org/abarth/tests/whitenodes/ This page displays true when the whitespace nodes before and after the head element are not inserted into the DOM. Is there a reason everyone should change their behavior here?
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Rejected Change Description: no spec change Rationale: Whether we change in behaviour here or not doesn't affect the amount of effort implementations have to do (since they're all going to have to update their parsers and parser tests anyway). So this just ends up being a balance of legacy compatibility vs sanity. In this case, sanity says the whitespace should be preserved, and I'm not aware of any compatibility issues. Thus the spec. There are other parts of the parser's whitespace handling (e.g. handling of spaces after </body>) where the sane behaviour wasn't compatible with the web, so compatibility won out.