Live data from Hacker News

Mathematically optimal markup with HTML5

shinyplasticbag.posterous.com

1–10 of 28 posts

Re: Mathematically optimal markup with HTML5

#3
I hope that in determining which HTML is optimal bandwidith wise, there is also some consideration of what HTML is optimal rendering wise. (obvious cost savings of going hard down the bandwith optimizing aside)

Knowing how the parser treats certain constructs and deviations from the spec. probably gives us some insight into how long things will take to parse. Or is client side that much faster than waiting on normal network latency?

Re: Mathematically optimal markup with HTML5

#6
post #2

Does anyone have more details or examples of Google's "crige-worthy" HTML for efficiency?

Go view the source of Google.com No or tags for one.

Which is funny, because there are so many better ways for them to reduce the data transfer. They have colors specified in hex that could be reduced to shorthand and save 3 characters.

Example: They are also wasteful in their embedded styles:

Example: margin:3px 0 4px;margin-left:4px

Heck, they could even change the path to the images they include on the site to "img" or "i" instead of "images"

Or remove the "http:" from the urls they link to from the homepage. Though, I'm not sure if all UAs will handle this correctly. They should.

Re: Mathematically optimal markup with HTML5

#7
post #2

Does anyone have more details or examples of Google's "crige-worthy" HTML for efficiency?

Go view the source of Google.com No or tags for one.

They can drop and too. Also, instead of they could have People often tell that Google squeezed every byte out of their markup, but it is far from the truth.

Re: Mathematically optimal markup with HTML5

#9
post #3

I hope that in determining which HTML is optimal bandwidith wise, there is also some consideration of what HTML is optimal rendering wise. (obvious cost savings of going hard down the bandwith optimizing aside) Knowing how the parser treats certain constructs and deviations from the spec. probably gives us some insight into how long things will take to parse. Or is client side that much faster than waiting on normal…

The parsing time is probably negligible. I would guess that parsing HTML5 would be a few if not dozens of megabytes per second on modern hardware.

Re: Mathematically optimal markup with HTML5

#10
post #8

I suppose some day I'll have to start writing my HTML to be read by machines, rather than humans. Right now I treat it like code: proper indentation, helpful comments, and the occasional hidden message for the reader.

Sure — I write my JavaScript that way, too. But when it's time to deploy to production, it gets packed.
Post reply on HN