Quote:
Originally Posted by felgall
[...] Since leaving out a tag means that the browser has to determine where the missing tag needs to be inserted a page with missing tags loads slower than one where they are all defined even though the extra tags makes the code to be downloaded slightly larger and hence slower to download but much faster to render after downloading(assuming you are using something faster than a 300baud acoustic modem where the speed saving on the download would be more significant). [...]
|
Why would a page with optional end tags be faster to parse (with the HTML parser) than a page without optional end tags (with the HTML parser)? That doens't make any sense. The input stream is longer if you include optional tags. The processing is basically the same (e.g., when you hit <p> while inside a paragraph you pop the current paragraph and create a new one; when you hit </p><p> while inside a paragraph you pop the current paragraph then you create a new one).
Unless you have real tests which confirm any difference in processing in browsers I don't buy your claims. However, even if it was true, the network is almost always slower than the HTML parser, which is why gzip is benefitical for HTML over HTTP, for instance (even though it means more processing).