LWN.net Logo

Authors don't code to spec, so browsers and specs need to consider that

Authors don't code to spec, so browsers and specs need to consider that

Posted Jul 28, 2012 19:20 UTC (Sat) by Velmont (guest, #46433)
In reply to: Seems both need to buy a clue by jmorris42
Parent article: WHATWG severs collaboration with W3C on HTML

If everyone would just code to the spec, and not do the horrendous browser checks (sniffing :( ) that you are referring to, the world would be a much better place. The problem is not that there are not good, stable and nice specs, it's that web authors never follow them. They write for one browser where they check what works and what doesn't.

Had they actually written after the spec text, then everything would've been better and easier to everyone. That's not how the web works, so it's impossible to have a wonderland system build on that.

Also, we don't break backwards compatibility. That was the whole reason Opera went together with Google and Apple back in the days to form the WHATWG. W3C wanted to boil the ocean and break everything with xhtml2.

We revert changes and edit specs all the time when we find that sites depend on it. It has to be that way out in the real world wild web.


(Log in to post comments)

Authors don't code to spec, so browsers and specs need to consider that

Posted Jul 29, 2012 11:41 UTC (Sun) by anselm (subscriber, #2796) [Link]

If everyone would just code to the spec, and not do the horrendous browser checks (sniffing :( ) that you are referring to, the world would be a much better place.

If I was supposed to standardise HTML, the first thing I'd standardise would be a simple, robust method by which a program could find out exactly which HTML features a browser supported and at what version level. This would do away with »horrendous browser checks« and make it possible to modularise the rest of the work. It would also make it possible to compare the HTML implementations of various browsers in a more straightforward manner, and make »coding to spec« a more viable proposition.

I'm actually quite surprised that this apparently isn't being done.

Authors don't code to spec, so browsers and specs need to consider that

Posted Jul 31, 2012 15:39 UTC (Tue) by nickbp (subscriber, #63605) [Link]

So, I think a strong "boil the ocean and break everything" specification that you mention would actually solve the "web authors don't follow the spec" problem that you mention.

If bad behavior is such a problem, then perhaps the next HTML specs and implementations shouldn't be so permissive of it. Likewise, it should be easy for both the web developer and browser developer to test and verify good behavior. Otherwise the problem will just continue to get worse as more features are piled on.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds