4 ms·
I demand to see some evidence supporting this assumption that closing tags "take up time". It seems to me that logic dictates it would take longer to parse a br
by tdavis 17y ago
I demand to see some evidence supporting this assumption that closing tags "take up time". It seems to me that logic dictates it would take longer to parse a broken schema than a valid one. Perhaps leaving out those tags saves Google $1MM per year in bandwidth costs; it wouldn't terribly surprise me. But what would surprise me is evidence that browsers are quicker at processing an invalid document.
- joeyo 17y agoI would guess that the rationale for omitting tags was to make their pages smaller so that the data transfer is quicker and cheaper.
- tdavis 17y agoRight, and I'm saying that it's presumptuous to just figure "Oh, fewer bytes == faster page loads!" The data transfer may be quicker (and their costs certainly cheaper), but does it do anything to speed up the experience of the site? Not if the saved milliseconds are lost parsing the monstrously invalid DOM.
- jerf 17y agoGo read the HTML specs. Very, very carefully, and without preconceived notions. This is not "monstrously invalid" for HTML. Many, many end tags are, in fact, entirely optional, as defined in the specifications, and many tags such as "body" are also surprisingly optional. HTML is not XML. It might be invalid, it is "monstrously invalid XHTML", but it is not "monstrously" invalid HTML.
- tdavis 17y agoI have been appropriately corrected (by you and others), thank you. I think I've spent so many years battling with anti-standards folks that I now take it personally when people advocate leaving out tags and not using a proper Doctypes and the countless other things Google does. In this case, I failed to do any research before making my argument, and have been deftly slain for it ;)
- sh1mmer 17y agoThe question is not if it's valid or invalid (which is another debate) but rather is it faster or slower. I'd like to see Google provide facts and figures. When Steve Souders worked at Yahoo! a large part of recommendations were backed up by experimental data collected by Tenni Theurer (my manager's wife, coincidentally). I'd like to see Google provide the same kind of experimental data for their guidelines. If saving 14 bytes is a network saving, where are the page render tests in browsers, particularly "A-grade" browsers?
- CalmQuiet 17y agoSee facts and figures? Absolutely. In light of the whipping their "facts" on PHP optimization recommendations have received here ( http://news.ycombinator.com/item?id=676856 http://news.ycombinator.com/item?id=676856 ), it's best not to take pronouncements from a google post as coming from on high.
- jerf 17y ago"The question is not if it's valid or invalid (which is another debate) but rather is it faster or slower." Well, the question I answered was whether it was valid. I'm not knowledgeable enough to answer the speed question.
- pmjordan 17y agoIf you look at the HTML 4 recommendation from the W3C, you'll find that this is not invalid HTML. SGML and HTML, unlike XML and XHTML, allow implicit opening and closing tags. As far as I know, they even allow overlapped nesting, which even breaks the tree nature of the document structure, e.g. <b>foo<i>bar</b>baz</i>. Browsers have supported this stuff since HTML 1, I seriously doubt there is any significant penalty in parsing. e.g. http://www.w3.org/TR/html401/struct/global.html#h-7.3 http://www.w3.org/TR/html401/struct/global.html#h-7.3
- holygoat 17y agoHTML 4 is not an XML language: it uses tags, but the concept of a document being structurally invalid is not the same as XHTML. Every browser that handles HTML 4 supports a kind of "tag soup". You must take explicit action to shift them into a strict mode; consequently, it does not take longer to "parse a broken schema" -- handling an HTML document without the final closing tags should be no slower than a complete document, because no validation is taking place.
- Confusion 17y agoTheir goal is not saving bandwidth costs: their goal is having their pages render faster. I can't find the link (will search in a bit) but I recently saw an article on Google where they had statistics on the number of searches they lost when their pages rendered a bit slower.