Scribd’s HTML5 is a mess
loud.anotherquietday.com
loud.anotherquietday.com
For those of you not familiar with the gory details of PDF, it basically uses absolute positioning for each character. If we converted that directly into HTML it would be a disaster. So, we actually extract quite a bit of structure on top of that, recognizing spaces, lines, columns, and paragraphs, which enables us to write much cleaner HTML. Scribd (and most PDF readers) does this with heuristic algorithms that make reasonable guesses.
In the future, we'd like to push those algorithms further, and extract ever more semantic markup. But this is a "nice to have" for us - mostly, people just want the documents to display correctly and load quickly. And, anyway, expecting the output of an automated converter to match what a human would write shows a basic ignorance of the state of computers and AI.
While you have the right to justify the lack of semantic markup in Scribd html docs, he has the right to expect a non-messy markup underneath.
Calling someone's expectation "ignorance" isnt very fair.
To expect the tool to have the same sort of semantic purity as the documents it interacts with is overly idealistic. It doesn't matter as much what we can systematically infer about an application, it is more important that the content be accessible in some sort of standard format.
Similarly, Scribd's HTML5 viewer, is just that, a viewer. Not a full fledged PDF to HTML converter. It's primary purpose is to allow a user to experience a document in its entirety in the browser. In a world of trade-offs, and priorities, the markup of the viewer itself is near the bottom.
From where I stand, Scribd's HTML5 implementation (if it turns out as good as the demo) is one of the biggest leaps forward I've seen on the web in a while, as well as one of the most impressive pivots I've seen a startup make to turn a negative into a positive. It's a huge technical challenge to do what they're doing and get it right; one of those things that seems hard to people who haven't worked on it and turns out to be far harder than it seems.
There's also the minor detail that they're producing this output for an enormous class of inputs, so to nitpick the generated HTML as if it were written by hand is to miss the point colossally.
Edit: on another note, it's probably a positive sign if people with this mentality don't like your work.
If the best criticism that people can come up with is about a piece that nobody can ever see or be affected by, you're probably doing something right.
Ignoring Scribd specifically for a moment, why do people insist that applications be built using technologies and best practices designed for documents? These are two very different things. For many applications it makes little sense to try to shoehorn the user interface into semantically "correct" markup.
However it often absolutely does make sense to render the documents created with these applications in clean markup.
That said, Scribd is fundamentally an application centered around displaying documents, so it would be nice if they were able to render documents in clean way. But given the nature of PDF, as the author alludes to, this is difficult if not impossible, so you can't really fault Scribd for that. Despite this (which is no worse and arguably much better than the Flash equivalent), there are other benefits to using HTML/CSS/JavaScript.
Remember that? This was the most advanced web application ever made, it had 100x the storage capacity of every mail provider at the time, awesome search capabilities, and the first mainstream use of asynchronous loading of data.
And yet, this people were mad because the links were not real anchor elements.
Go get some perspective kids.
I think the author missed something.
But I disagree with the claim that it isn't HTML. It sure isn't pretty but a if you define HTML as the input that the HTML parser of today's browsers can handle (rather than the HTML spec) it is perfectly fine.